Compare commits
1342 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 34eee81a55 | |||
| bec2a832ea | |||
| 6d86238f0a | |||
| 758d5bad17 | |||
| 291ff22366 | |||
| f4f0b8f8ce | |||
| b8abc5aa16 | |||
| 28fd3c9c89 | |||
| 2c94cd19f6 | |||
| 8add2bca63 | |||
| 77041374ea | |||
| 3d54904e89 | |||
| a9d1f16cd8 | |||
| 0439b22269 | |||
| 3fe8abf25c | |||
| 04299ac0f5 | |||
| 96397ea768 | |||
| 6580b36e35 | |||
| 4af4384dac | |||
| ebaaf0b242 | |||
| bea36e2aa2 | |||
| 247ec17be3 | |||
| 577c378517 | |||
| 52e631f229 | |||
| f8307f725e | |||
| c13fbcaab2 | |||
| 6c4eff321e | |||
| 54b8b73d45 | |||
| 0e88b7629e | |||
| 012f148622 | |||
| 56a20cc877 | |||
| b8df922459 | |||
| 896232d308 | |||
| 0207327ded | |||
| e6815a3a4f | |||
| 179bbaea92 | |||
| c7889bc7a2 | |||
| ce9ecd124a | |||
| 426a12d50c | |||
| eefd0ed728 | |||
| 6604043df0 | |||
| a3271bb290 | |||
| aeed3598a1 | |||
| 4b43986a6c | |||
| 4f79180a8e | |||
| a635c4c35c | |||
| afc42f4ed3 | |||
| 547accfd44 | |||
| ccb51c7a26 | |||
| 33190bba34 | |||
| b3147011d4 | |||
| 4c987901b6 | |||
| ce332b895f | |||
| 9b5823109f | |||
| 7a84fb8cdd | |||
| 94c5c525a7 | |||
| 0d25e419b4 | |||
| b669f8363c | |||
| 8e44aa6f88 | |||
| 3ef70f862e | |||
| e4d99edb65 | |||
| 5f611786dd | |||
| 657711a0a7 | |||
| 0f1e6e7702 | |||
| e379ffae51 | |||
| b10d5e715c | |||
| 2f54637881 | |||
| eda1e01a71 | |||
| 8fdc4b8f58 | |||
| 3048825824 | |||
| 704685c11a | |||
| 7fba3a04da | |||
| bfc57ecfc6 | |||
| c0dba7f121 | |||
| ce3e63f3a5 | |||
| 0105503855 | |||
| 0d8525f1b1 | |||
| bfd4a1e846 | |||
| c74343d2dd | |||
| 6f7f545cd8 | |||
| 303885776e | |||
| cabcf5b73c | |||
| a8a1972418 | |||
| 347778d8aa | |||
| 9646c951bb | |||
| 7b4128f6b2 | |||
| 7ac623fc99 | |||
| e9328255b7 | |||
| 11ce47287b | |||
| a1ab25955d | |||
| 3f59b82c2a | |||
| 0e6cded6cd | |||
| e18f73b317 | |||
| e65146503c | |||
| a6a5c65067 | |||
| afb58fa423 | |||
| 8762636374 | |||
| d1b53fb56c | |||
| c7b028b8cf | |||
| d0ee364a81 | |||
| a48fdc0d2c | |||
| a464034fd0 | |||
| 51955cae76 | |||
| f2633d528e | |||
| 33090e1aa4 | |||
| ffc801eaca | |||
| 49e77a1fa1 | |||
| 13c5ddc5fa | |||
| 1ee54eecbd | |||
| b7ac285aeb | |||
| b6b50f1842 | |||
| d283792193 | |||
| 0c5ccd267c | |||
| 81108e2d26 | |||
| 3c3590bafe | |||
| b9e1120f69 | |||
| 9f943337bb | |||
| ab8964be1d | |||
| 37c1ba3926 | |||
| 364d077c8a | |||
| 626f86b500 | |||
| d6488e4e7d | |||
| 846abef17f | |||
| 60e65a4d01 | |||
| 4057365ff1 | |||
| f7d95e2791 | |||
| db812e7f7b | |||
| 66e51bab0d | |||
| d0d82a5e22 | |||
| 2d99e76007 | |||
| 102ff2145f | |||
| 0e00282758 | |||
| 337d12e490 | |||
| 916e125f4b | |||
| 752ef70000 | |||
| b67c70dbe3 | |||
| 8277ba6b5b | |||
| 2db2a4a94d | |||
| a477b862dd | |||
| 0a5cf3bcee | |||
| 2d6e2bcd61 | |||
| 8d8b52dead | |||
| 3409759271 | |||
| 3109dad59b | |||
| 16c35e21f4 | |||
| 509b33477a | |||
| 4fcfdd24d1 | |||
| 473e8ea861 | |||
| 0bbbde3fb6 | |||
| 0576bb71de | |||
| e91d35abda | |||
| da638df367 | |||
| bf8467aaa0 | |||
| 3a8eea3223 | |||
| 566ed9bae6 | |||
| 132341c9b5 | |||
| 3f2a18a387 | |||
| 296f940437 | |||
| dc7833e0fe | |||
| 7f38694341 | |||
| 0a25f4e488 | |||
| 88d5b6ea16 | |||
| b775916a8d | |||
| c1e4d3d598 | |||
| 2435b50e6d | |||
| 466c40f501 | |||
| e76f4205cb | |||
| 1961d467d9 | |||
| 3cb9b3637d | |||
| cf0232d24a | |||
| d1c786aa4a | |||
| 209b2b2099 | |||
| efd378e71c | |||
| 50edf2ad83 | |||
| 27aae8a8f0 | |||
| b07cae5959 | |||
| f786704d9a | |||
| 9f46f7a824 | |||
| 9b98a0f442 | |||
| 165c6886c1 | |||
| c79f9f585b | |||
| 486ea3dc70 | |||
| 765566acb0 | |||
| 06e06c3504 | |||
| a16cf65808 | |||
| b65a5e6452 | |||
| ec88378641 | |||
| e22cc152d8 | |||
| db8adea231 | |||
| 7c7c92fe91 | |||
| 7a8dec6afa | |||
| 49637c2dbd | |||
| 51372d281a | |||
| 3a4973ba20 | |||
| e447c6170b | |||
| 90b25d3ea4 | |||
| 951afa8799 | |||
| 644243db31 | |||
| 212a1f0682 | |||
| d700cd9a97 | |||
| 59d4ff87b8 | |||
| 08641efd0c | |||
| 7c81554b39 | |||
| 6fc1792436 | |||
| c2855f7871 | |||
| 5988076d56 | |||
| 4a0164fc7f | |||
| 9bad334102 | |||
| 4dfca9e6c1 | |||
| 8b1dee04cd | |||
| d856bd13be | |||
| e9d198109c | |||
| aed19f9492 | |||
| 126c520d14 | |||
| 6d23374f01 | |||
| 6f0c5873c2 | |||
| b8fb05f30f | |||
| 925b53db58 | |||
| 99c1268051 | |||
| 6be247e07d | |||
| dfa423b62d | |||
| 49b95e1a8a | |||
| 03eedca87c | |||
| 4602f8b43a | |||
| 9b77f044ab | |||
| 7200908ea9 | |||
| b87827f53b | |||
| 173370b905 | |||
| 628703aab3 | |||
| 6bd014b9a6 | |||
| 7feff9e690 | |||
| af300d118a | |||
| 25e74c5f79 | |||
| c63d860d1f | |||
| 32db1082c0 | |||
| 06193b4285 | |||
| 1192c546a1 | |||
| ec3881d5c4 | |||
| 473ae87547 | |||
| 6112741a6b | |||
| b68e23551a | |||
| 817bc804a6 | |||
| 93976e043f | |||
| 07b48bd353 | |||
| 6923507e74 | |||
| 5e1a260546 | |||
| 63e2cc802c | |||
| c4bdd4a800 | |||
| 0fdca7c146 | |||
| 0d35f3709b | |||
| b1e366a31f | |||
| 922e5c0fbb | |||
| 11bc000a85 | |||
| 8ab9bb0e01 | |||
| ea83307012 | |||
| df35b3f955 | |||
| b9b460e549 | |||
| 91f78bee55 | |||
| a0833f0dd7 | |||
| b9a2c8d50c | |||
| dafd79d55b | |||
| 18808fffec | |||
| 29ea80260f | |||
| a61dd71833 | |||
| e1b740eeff | |||
| c99e94e24d | |||
| 7141ae8478 | |||
| b10df22048 | |||
| 986a5822bc | |||
| 5f0057d3f8 | |||
| 8b64077881 | |||
| 61c7e90f86 | |||
| 9ec2752883 | |||
| 192fe79839 | |||
| 51e548d481 | |||
| 045077e983 | |||
| 334195cc8f | |||
| 1d5696e10d | |||
| d4139d026a | |||
| 13520a7e23 | |||
| 49890f230a | |||
| 0bb8c545f0 | |||
| f7d799ea78 | |||
| c7cadc4097 | |||
| 583b4d79af | |||
| d58bea4f19 | |||
| bacab075d8 | |||
| 46b4ca65eb | |||
| 783fdc120a | |||
| 4cce7d9523 | |||
| 065a1736f6 | |||
| 8f5119bb10 | |||
| f5a9eb90ac | |||
| 24f553dfec | |||
| 47be57973e | |||
| 23240e634a | |||
| c13438cee9 | |||
| 3e3cd634a0 | |||
| 72c5974efe | |||
| 5832498bfe | |||
| 965418255d | |||
| 317f981657 | |||
| 8706c55260 | |||
| d29326065e | |||
| e5cdb1346d | |||
| 9b2ff06341 | |||
| 725382a378 | |||
| 61c4cac28e | |||
| 05a0273995 | |||
| 5c30ed7ebe | |||
| 32f7790b1f | |||
| 0926618ed0 | |||
| e4b8b3e726 | |||
| 0615b8432e | |||
| 88ad3fc1dd | |||
| 4187cdafd4 | |||
| 62d4323c95 | |||
| 57f1fb6505 | |||
| c953a71e36 | |||
| db7075753d | |||
| f9709a429e | |||
| 3bc64e4af3 | |||
| 49cf9af762 | |||
| ed14a0576a | |||
| ec3a4ddb5a | |||
| 097479d0b0 | |||
| a995e3f542 | |||
| a0cfb8779d | |||
| 3b137c3e54 | |||
| 50cc54840f | |||
| d9799ac5bb | |||
| 64bf3f1b9c | |||
| b791945564 | |||
| a8cc7abfff | |||
| fa15618437 | |||
| 844f7ac4d2 | |||
| a43426bf64 | |||
| 7015216392 | |||
| 5cc0dbbf08 | |||
| 98acd5b0f3 | |||
| 14f24424ea | |||
| 9483a7daa5 | |||
| 89d93544a7 | |||
| af3a579122 | |||
| ae769272a6 | |||
| 5f08daa85a | |||
| 8fdec02557 | |||
| f8cef3d339 | |||
| d891dd290c | |||
| 0b366f6850 | |||
| 899bf47d34 | |||
| 888c485186 | |||
| dbbabbb2dc | |||
| 7a38331f8c | |||
| 0dbcb352c9 | |||
| 1ab0b43202 | |||
| 106d95e795 | |||
| cf9005e457 | |||
| be7fd4fa13 | |||
| b0f848b089 | |||
| 07077e89b1 | |||
| bc2a0451db | |||
| 4e38257900 | |||
| f934838a59 | |||
| ee0fb68d60 | |||
| 37e8fd19cd | |||
| f600e6a24b | |||
| ca9009f5fe | |||
| 9a299a9b38 | |||
| 845ae6e7ba | |||
| 8f706107ac | |||
| d489199e00 | |||
| bf023dc2e3 | |||
| ac6b04b5e3 | |||
| a34de5d601 | |||
| b9900776a8 | |||
| 12a444c11f | |||
| 433473e53e | |||
| d5f889767a | |||
| 9873dd487c | |||
| ec8bed61f1 | |||
| d76971385d | |||
| b87fed5541 | |||
| bd8d3dbc38 | |||
| 6022e3fa2b | |||
| c5c8a6e20e | |||
| 3306bc848a | |||
| 2911ef54e5 | |||
| cc54d1970b | |||
| e6915fffd3 | |||
| 964d746f6d | |||
| de6af43d74 | |||
| 0dc1a6e46c | |||
| 4098830804 | |||
| 304ab15b8f | |||
| 16fa9410db | |||
| 9ff69de20c | |||
| cd50f1ee86 | |||
| 195f3d6130 | |||
| 89d8622f6f | |||
| d71e054eb4 | |||
| 48a648eecd | |||
| 63268d079e | |||
| 743d5ca81a | |||
| dffb33c8e0 | |||
| a6ea0931dd | |||
| 17016c0eb2 | |||
| 67c703d934 | |||
| c163d1c936 | |||
| e3c15a2c58 | |||
| dfc149f292 | |||
| 627ba65b9a | |||
| a92170d88a | |||
| 503653cb5e | |||
| 68c277ff9a | |||
| 7b171b4f9b | |||
| 30956e4c58 | |||
| 6a956aacab | |||
| 681c845e2d | |||
| 11594ef5e8 | |||
| 28f06291db | |||
| c6937698ed | |||
| 15f85c8b80 | |||
| 7fd5695f83 | |||
| 952880287b | |||
| f76c7cf25a | |||
| 7c14b4d381 | |||
| c67389f0a3 | |||
| 219994ced2 | |||
| 274f08807e | |||
| 7601b4d3da | |||
| 05d14b4bfd | |||
| c5b63fd1c5 | |||
| 0bb6a926b2 | |||
| 0124eacb15 | |||
| 7ac06761d6 | |||
| c8c6226045 | |||
| 507d9610c7 | |||
| 5f4075fc35 | |||
| 514571cc80 | |||
| 6ff34b71cf | |||
| 37416daa53 | |||
| 6bd5401633 | |||
| ea6b9571b5 | |||
| bd7c403986 | |||
| 99417726ce | |||
| 4319e542f7 | |||
| 61d8445949 | |||
| 743095064d | |||
| efa12ab5a6 | |||
| b49b1b392c | |||
| 09e54e9915 | |||
| 373d175f2d | |||
| 5f3955a04a | |||
| 98c0e51527 | |||
| 8b3a6e8fc6 | |||
| b2d2e8ba7e | |||
| f1efced19c | |||
| 5b09dfc80c | |||
| 39f91a4368 | |||
| 3b6c9bde63 | |||
| 1df05ea53e | |||
| 3e9aee1c6f | |||
| 5231a460da | |||
| e6b3b36df9 | |||
| 060d510658 | |||
| 3b21a4aa97 | |||
| 4824b44950 | |||
| 988a92d4a5 | |||
| 378e2e61bd | |||
| eb94a7d9bb | |||
| fe2ba07a57 | |||
| 2788b12eb2 | |||
| 265b553b4e | |||
| 5f800681aa | |||
| 890c9cf591 | |||
| 2c356b80ed | |||
| cc097ba7da | |||
| 78401f1c4a | |||
| 8802363544 | |||
| 05388c3733 | |||
| 8f84301b39 | |||
| 774ba5d990 | |||
| 6bf0cd93d1 | |||
| 7f63c26348 | |||
| bce3e6ede1 | |||
| 4f642041f9 | |||
| b990b2768c | |||
| 53b8d37d8c | |||
| db9f63c2d9 | |||
| 87df4ff487 | |||
| f0fe459460 | |||
| f71a35751a | |||
| 2458d9cbb3 | |||
| 81c6d33005 | |||
| dba5c20e34 | |||
| c2eddb21e5 | |||
| de1d289670 | |||
| 623201fd75 | |||
| 2f900b6bc7 | |||
| 375af0cccd | |||
| 8ae8e887f5 | |||
| 201b6432c4 | |||
| fc10bbf6b6 | |||
| 1c82c71aea | |||
| a59abd3135 | |||
| a51633b511 | |||
| 2b40d265f9 | |||
| 734b5b02f8 | |||
| 4120434e5a | |||
| 6d9c4dc6d9 | |||
| ce94a1360a | |||
| 27a61f4faf | |||
| 36f50a482b | |||
| 28d681b29b | |||
| ddb53bfce1 | |||
| 81414254f9 | |||
| 4af4481a17 | |||
| 1e6e0f0800 | |||
| f1cff045e1 | |||
| b3b3c55473 | |||
| 7f2c6fd977 | |||
| 59338d3ae3 | |||
| 98a5647f97 | |||
| 5d11642776 | |||
| 297277451f | |||
| d5ec269811 | |||
| 02bbe29ccb | |||
| 3844ace955 | |||
| 3715a03598 | |||
| 82c695a199 | |||
| 09ff58a1a6 | |||
| 0fbe522235 | |||
| cc38b5e5c3 | |||
| c6101f5565 | |||
| f4e50ae4d8 | |||
| 3f42edbb08 | |||
| c63ff665b2 | |||
| 230ef6d4ca | |||
| 9d1783f4d6 | |||
| 99d14d9521 | |||
| 57ed7e692e | |||
| 6aaf974049 | |||
| 1fce0f5557 | |||
| f75f0ccb14 | |||
| 01f82aaf4c | |||
| 8b294e05ad | |||
| 5b2fcb85e5 | |||
| fb1d38dc3a | |||
| 5cc6a8d75a | |||
| fbe2a03933 | |||
| 915bccf099 | |||
| 0943e368e7 | |||
| d35c6e190c | |||
| 1025ad5a6a | |||
| fd74541318 | |||
| 821db477ae | |||
| ed66034930 | |||
| a9c91378fd | |||
| 1dc58f2ed1 | |||
| ae916e2a59 | |||
| f3af72e67e | |||
| 939c2121b7 | |||
| 46699bfc1e | |||
| 63d381d5a6 | |||
| c608d18684 | |||
| c31f61e7b6 | |||
| 9912c15c04 | |||
| 651653593c | |||
| 85858974b8 | |||
| a265fbb797 | |||
| e353ea2d56 | |||
| 6f91db067a | |||
| 8ed51cc810 | |||
| f256f174f9 | |||
| 49d3796378 | |||
| bfb6a18527 | |||
| 2960220a74 | |||
| c6605f1742 | |||
| cebffcfee1 | |||
| 006cdb8c3b | |||
| 374e0697bf | |||
| f988878424 | |||
| e59b252dce | |||
| b2747914d8 | |||
| 41aeb625f3 | |||
| 4cfa8aa06c | |||
| 8cb4a4e3b9 | |||
| 9a84c9715f | |||
| 38538f1d9a | |||
| 6a42b2a107 | |||
| 486790b810 | |||
| 0e538e2261 | |||
| 9042fcca55 | |||
| 040035adbc | |||
| d72097de18 | |||
| d9771bdade | |||
| 07ca905373 | |||
| ccd0d45a67 | |||
| 15a15870e7 | |||
| 28108c7796 | |||
| 171f388120 | |||
| bc50f171db | |||
| ea4c955f1f | |||
| 27524457d0 | |||
| 01fe67cfa9 | |||
| f4d493465d | |||
| 33cbe44390 | |||
| 5214f08d1a | |||
| 608fc986c4 | |||
| 779a96f97f | |||
| faf48246d7 | |||
| 81ec2a6c35 | |||
| 803423f12b | |||
| b384ee0381 | |||
| b8862d6b24 | |||
| dbfa4ed46d | |||
| d9eb999775 | |||
| b4a9ca3f87 | |||
| d087c86d1a | |||
| 0cfc7b25a6 | |||
| 8f3c9bd2ba | |||
| 91c79cdac9 | |||
| 20e4e110ce | |||
| 870d7ffe2c | |||
| 6ff88c914d | |||
| 2a2078517f | |||
| c09f697293 | |||
| a9e273a13d | |||
| 592665aa9a | |||
| 3745788f06 | |||
| 52b09d8f4c | |||
| 32f25cdcec | |||
| 6f022a9b6a | |||
| eea6970929 | |||
| 35ecfd279f | |||
| 1f5c610843 | |||
| 05f4c52c33 | |||
| 326f773e75 | |||
| 2079b518a2 | |||
| 70ed15e5ac | |||
| f1d7fe0c73 | |||
| 08e4b9bafc | |||
| 56a0212316 | |||
| 5df6506191 | |||
| 39779be980 | |||
| bdacdddf14 | |||
| 4b32337ef3 | |||
| 4897d5b7a9 | |||
| 6daa64facd | |||
| 07651e414d | |||
| 7e1e76f0d8 | |||
| b91a5d1a16 | |||
| 39b0646f24 | |||
| ea6406f144 | |||
| 7ed3f3fbad | |||
| cacb4ac40e | |||
| 9503744631 | |||
| 58dfd5dbfa | |||
| 60d5507184 | |||
| 5641cec146 | |||
| dd455e3d14 | |||
| 6876697f74 | |||
| 4373cab8cf | |||
| eeccb5833b | |||
| 790dad0330 | |||
| 078a38af5d | |||
| 8c186d2eb1 | |||
| 81b94b27e0 | |||
| 17e8616e8c | |||
| 50b0dc3c5e | |||
| 9e217e722f | |||
| f466b44b66 | |||
| 34e0fc7cba | |||
| bb88a7bb95 | |||
| 71ba444e62 | |||
| 3e0baee463 | |||
| a0064f5511 | |||
| e7ce23f377 | |||
| 9c6d93968c | |||
| e4b29d58f4 | |||
| a48b87a0d6 | |||
| 763515a937 | |||
| 46a8242e51 | |||
| efa8d66d3d | |||
| b7c71bb3b8 | |||
| aca5438b5a | |||
| e7eb23ab5e | |||
| 05dd8bfcc7 | |||
| 2c299ab079 | |||
| 62acff5c75 | |||
| 316d146893 | |||
| e69fee2108 | |||
| 8fe6e1cf20 | |||
| 6fcf7dbbba | |||
| f55c5f0ce5 | |||
| aaf8369421 | |||
| 8e26c7730c | |||
| 556ca0611a | |||
| e2e78c175b | |||
| 7b8033e6b2 | |||
| d602645fee | |||
| f8ac9c9e83 | |||
| 98c90f8ab3 | |||
| 16bb21ee62 | |||
| 46bfec93d4 | |||
| 00e1ecf37d | |||
| a3e7b290fb | |||
| 27ce59963f | |||
| 54e3a97447 | |||
| f886f710b7 | |||
| a895e1dc6c | |||
| 6f24d8eebd | |||
| 000174c2c4 | |||
| 192aaea186 | |||
| eb0d6b696e | |||
| 94e1b0eb56 | |||
| 694a1cd6d5 | |||
| 0600897a26 | |||
| e8c52f9417 | |||
| 6d86963b1d | |||
| 01e621067a | |||
| cd379ef1a3 | |||
| 41a4fbfb4d | |||
| 04db2112c3 | |||
| d20bfb18bc | |||
| d02d83f896 | |||
| 6b45c92a58 | |||
| 871ad8c07f | |||
| 997290cd28 | |||
| fcfab5ada6 | |||
| 005f45bad3 | |||
| ef64872af5 | |||
| 2cd5528df9 | |||
| 0a73e6f905 | |||
| b9f468e3f4 | |||
| ad5631ffc1 | |||
| 50767c211a | |||
| 8223545b72 | |||
| 9925fa78e7 | |||
| 7834365803 | |||
| 5bfeea6e30 | |||
| 1877fcfe65 | |||
| 98437bc207 | |||
| 49e9560e91 | |||
| 9c5084ef14 | |||
| 401c503c91 | |||
| 73d4515f9e | |||
| 9faadbd077 | |||
| c886f16308 | |||
| 6b4b410708 | |||
| d6e50d840f | |||
| c1848159a9 | |||
| 46f503ec3c | |||
| 71f40a33f7 | |||
| 94e789efde | |||
| d738da4272 | |||
| 8bbf9cb618 | |||
| c5276e5073 | |||
| 9b0a739872 | |||
| b3e817e1d4 | |||
| 96a73712eb | |||
| dc91721ca2 | |||
| 7175bb664c | |||
| 2a49120ac2 | |||
| 4ef546649b | |||
| f1a77bd2b0 | |||
| aa8b6d364b | |||
| 1245c6120e | |||
| 2995118cae | |||
| a201418d1a | |||
| 1b46904897 | |||
| 1cf6764a08 | |||
| 6527b4e198 | |||
| fd4d01374f | |||
| c77a11382d | |||
| 1239153a1c | |||
| ae7152a5fc | |||
| eec4eb73b5 | |||
| 0ab3521005 | |||
| 660ef587c9 | |||
| 541dd7b3c3 | |||
| ca53e2f696 | |||
| 80764e130f | |||
| 6afd0120c1 | |||
| 953be074f2 | |||
| 03781d24d6 | |||
| 55d87064a8 | |||
| 512478b945 | |||
| 1c19ca8062 | |||
| fc764b464d | |||
| 945b4fc1cd | |||
| 902b17462e | |||
| 8b0b39829a | |||
| 356ca9cd1e | |||
| 634da84442 | |||
| 1d109ddaee | |||
| c1f996da07 | |||
| b14c9f8954 | |||
| 126050b4f3 | |||
| 313e417f28 | |||
| e98ef1025c | |||
| 3729e4bc3a | |||
| ac071777ad | |||
| 445972756d | |||
| 91732e7def | |||
| 5b7e4af26c | |||
| 2bb459cda5 | |||
| d410c73074 | |||
| da70f197fe | |||
| c18ffb28d0 | |||
| d5f17ef9f1 | |||
| 79c3f426e5 | |||
| b004dd138f | |||
| 45b479e324 | |||
| b07cbd4193 | |||
| ae2739f32d | |||
| dd51fcb1fd | |||
| edc26fe0a4 | |||
| c9215b3b71 | |||
| 115338bdeb | |||
| b0b10ac7d3 | |||
| 5a6013aac9 | |||
| f3aa299aa0 | |||
| 8e44536133 | |||
| 0cb937298e | |||
| 6ed0491520 | |||
| af7748920c | |||
| 3c1c0310d8 | |||
| 91a67304dd | |||
| 04d0e46c3e | |||
| ed27eac80b | |||
| 1f3e02bbdc | |||
| 275e938602 | |||
| 3f80320d37 | |||
| 0e44ce7636 | |||
| 8fe727a8a1 | |||
| b82f7a5548 | |||
| fe15242479 | |||
| 677a9b0dab | |||
| 309001e2fe | |||
| 90e782c9c6 | |||
| f95d9cacb5 | |||
| 308d1e6b00 | |||
| c57b3004a0 | |||
| 00bd5c96e9 | |||
| 371b11370a | |||
| b9338a7446 | |||
| e39ae375f4 | |||
| 975907aebf | |||
| ccfbdf6f3a | |||
| 7934d40b7c | |||
| 3b569a10bd | |||
| 941d959ee5 | |||
| d5a51c8139 | |||
| fc79078d51 | |||
| d6615410dd | |||
| adee372b4b | |||
| 9c7542a357 | |||
| bc18285a61 | |||
| 7b6c3f52e0 | |||
| f95c6e479d | |||
| e4e224348f | |||
| 7e914da261 | |||
| ae3eb40a0e | |||
| 2f8cd81870 | |||
| a1e7b60dab | |||
| 92515fca49 | |||
| 6a8abf2a79 | |||
| 9a47b02840 | |||
| 488c1c34cd | |||
| 52bd7de14f | |||
| deb0f813ca | |||
| 5030513375 | |||
| 53deb04137 | |||
| 2c60f5251f | |||
| 64ac5a9317 | |||
| 607113b31c | |||
| 5a472ef44b | |||
| c67ba9b4e4 | |||
| 3f36d3a881 | |||
| d188618785 | |||
| e6827bdff8 | |||
| 85ac26fb1e | |||
| abea49df8e | |||
| bfc7de0d16 | |||
| aa8c3ecec9 | |||
| 7ab984972e | |||
| da09c4d04f | |||
| c42457446f | |||
| 40bb6ca557 | |||
| f2cc5d25e8 | |||
| 04a5460e8b | |||
| 12ef8ee199 | |||
| 9c2d2f3a06 | |||
| 94bcfe5c58 | |||
| fecd13c733 | |||
| a9a6595d43 | |||
| e4e9ea4e87 | |||
| 588682f0d2 | |||
| 0b502d5530 | |||
| 86a2b5d4e5 | |||
| 312a657e78 | |||
| 6197597ec9 | |||
| c3ee29a9b0 | |||
| d5b26aa973 | |||
| 5d926ad49b | |||
| b5f133ce17 | |||
| 6ee4474e5e | |||
| d515d07110 | |||
| 3d2e5124d4 | |||
| 48a826a13d | |||
| 64e82c2c62 | |||
| 9c5d4d7ad5 | |||
| 5f006c8f4c | |||
| 3d8b6cbecb | |||
| 7e2e123af7 | |||
| 14aa4c4e3d | |||
| 2c15237b8a | |||
| b4845252c1 | |||
| 2f513235b3 | |||
| c68b3bae89 | |||
| 3825e88883 | |||
| bbe0fdb98f | |||
| 009969dab5 | |||
| 376ac7ad81 | |||
| de8257f459 | |||
| 3b0fbcc55f | |||
| e33abc05fb | |||
| 430ee03d45 | |||
| 03477d1c75 | |||
| ef9ee657f7 | |||
| e31f1ac63f | |||
| 33a6c97446 | |||
| 99e9e6e9ba | |||
| 1d81cede71 | |||
| 54ab9e0f1b | |||
| f0df9a7a05 | |||
| adc3bf820b | |||
| d26ac890a5 | |||
| d0397b2111 | |||
| 0229de3f0d | |||
| 176150be7f | |||
| 04992fa431 | |||
| b26725fd01 | |||
| 601e7b1949 | |||
| 37c1571792 | |||
| 812144bdf0 | |||
| 6e616fda4e | |||
| 3f120ce658 | |||
| 5446da46dc | |||
| 172efcac94 | |||
| c5ce6c0f4b | |||
| 40f8644ac2 | |||
| d45cf0d79a | |||
| 68937a71b9 | |||
| db435f5a0a | |||
| 40c469fa23 | |||
| fe7c7e2299 | |||
| 2f9d9f9dee | |||
| 293508969a | |||
| 5908546828 | |||
| b80f6a1e8e | |||
| d3434400cd | |||
| 11a20e21d1 | |||
| 0de0aa292a | |||
| aa0d357bdc | |||
| ca16c24fc4 | |||
| d32db0c9a3 | |||
| 60b9f0522c | |||
| d3c58da216 | |||
| e81044465d | |||
| 75a0741c33 | |||
| a68f4af35d | |||
| 9e0932af5a | |||
| 112c0bce66 | |||
| d640759ab8 | |||
| bb628bd9cd | |||
| ed3c0937d9 | |||
| 48cf0cd50a | |||
| a39934d0c4 | |||
| 2a9eaf9dea | |||
| 0d07b4dcb6 | |||
| 76fbce3304 | |||
| 510eba1628 | |||
| c37fede2f1 | |||
| 3ccb522e33 | |||
| a067d0c830 | |||
| 2f82c7466d | |||
| 9e9a6b7f8e | |||
| 9db36905c6 | |||
| e5ae260c33 | |||
| 4e3a579eed | |||
| 4cd1e62978 | |||
| babd95540d | |||
| 905de15883 | |||
| 00f31ca351 | |||
| cb82cfae3e | |||
| 1a36f1feb7 | |||
| d1893c6e17 | |||
| 330ec0e68c | |||
| 830304b79e | |||
| dc5940ac56 | |||
| 437cc8784f | |||
| 8e08e6647a | |||
| 60a21a7bbe | |||
| 6251a86cfe | |||
| 580ea88cd0 | |||
| c93734cd9c | |||
| f7e2f0dd1a | |||
| 943b505ec2 | |||
| 75304e781a | |||
| d73326af11 | |||
| 670eca455d | |||
| ab38c2e521 | |||
| 1ded9b2959 | |||
| 7c67db202f | |||
| ba4321956b | |||
| 79e4b5a2fa | |||
| 5b84b0507c | |||
| c15d13e543 | |||
| 3ef27787b4 | |||
| e84e8102b6 | |||
| ee8d1a531a | |||
| 2d4d1903b2 | |||
| d1cc2015ac | |||
| be44f0805c | |||
| 612207510c | |||
| c2875e4a7d | |||
| b8d2433a79 | |||
| 43cc8b425a | |||
| 7962073926 | |||
| 281a35bc66 | |||
| a4f6a18bb8 | |||
| f50adf3ed2 | |||
| f1b78b4a05 | |||
| 7953f8adf1 | |||
| f3062e6f22 | |||
| fe4eda2661 | |||
| 2be10ba84c | |||
| 82b3d0e78e | |||
| 079180f4ce | |||
| 9a3369c27c | |||
| b87e10cdcf | |||
| 229c542d68 | |||
| 3478d079d6 | |||
| a7fc70402e | |||
| 5df6419a59 | |||
| 8b03bc5072 | |||
| 6ca8a37cc6 | |||
| 9fbf1ee1b2 | |||
| 84b7741fa4 | |||
| e6efaa5f9f | |||
| 330c2e247e | |||
| 923f56273c | |||
| 8b761aa689 | |||
| fa538db11f | |||
| e4dff364e1 | |||
| 5d7faf0274 | |||
| ee0cafcf67 | |||
| 94506ad601 | |||
| f0b54ea7f9 | |||
| 11dbf23952 | |||
| 8957aa4f2f | |||
| 7e206549fd | |||
| f365408bbc | |||
| 0bdf5cd904 | |||
| 9ba28e5cd2 | |||
| 49ae49a82e | |||
| 23e9fffd68 | |||
| 1c6df6230d | |||
| 88584747e4 | |||
| d77d1c266b | |||
| d9738a2809 | |||
| a40d997413 | |||
| d444558b06 | |||
| 07164c156b | |||
| 625df4c7ac | |||
| 75a047e18d | |||
| ade3d4f935 | |||
| a0bc604d92 | |||
| 10743adcee | |||
| 4e9af0789c | |||
| 83f7ef6fd7 | |||
| b2850cc6ac | |||
| e41c71da98 | |||
| 0e3468872b | |||
| cd6a49e679 | |||
| 494e1a944b | |||
| 1361825f5d | |||
| b977e20156 | |||
| ff858e599d | |||
| 4c7bdede29 | |||
| 4208836d77 | |||
| 592341f5b1 | |||
| bc41ebadce | |||
| 0deadb41ee | |||
| 076624c4c2 | |||
| 943b421779 | |||
| c21acfb108 | |||
| 8ae58964d8 | |||
| 0cf0135a00 | |||
| 11d8a8a249 | |||
| 8edacbf9f1 | |||
| e6f49527b6 | |||
| 9b897f7ffc | |||
| bc06c75cf2 | |||
| ef324e2f9f | |||
| 002ed104de | |||
| 211fd59d66 | |||
| 3827198240 | |||
| 760d975d5b | |||
| ad25bd6597 | |||
| 9edc9aa741 | |||
| 061f481d10 | |||
| f33839212d | |||
| ac46d25470 | |||
| efdf7d4e30 | |||
| 76d942ebb3 | |||
| 24881174ce | |||
| 88a44ea1a9 | |||
| d0aed4a284 | |||
| 47f5cce2c3 | |||
| 534f669e1d | |||
| 2f422080e9 | |||
| 6efbd90a7c | |||
| 446b5fd32f | |||
| 705dc5f53b | |||
| c5dba9f4a1 | |||
| 904c2ebe73 | |||
| 275f52814f | |||
| 693cf9f8c9 | |||
| 35c2ec5a83 | |||
| 3b60efd744 | |||
| daac5d8ebf | |||
| 1fab6d8707 | |||
| aaff11668a | |||
| 536341a819 | |||
| b9c468e446 | |||
| 03edec9785 | |||
| da70a85d75 | |||
| 4ba170b8d8 | |||
| 72ae15c635 | |||
| 1179066dda | |||
| 62d0093bee | |||
| 55c0d3b4a7 | |||
| 92014eafdd | |||
| b1be4c8ed4 | |||
| 06f36dd8d1 | |||
| 3a15f5c717 | |||
| 031f3338b1 | |||
| 66125b2e10 | |||
| e6becffc4c | |||
| d281e57879 | |||
| 5196a970a0 | |||
| efcbc92e7a | |||
| 142fa33548 | |||
| 4b6e871ac6 | |||
| 1fbbad053a | |||
| 61aa933d97 | |||
| 70c3ea773e | |||
| a16de04682 | |||
| 0280a12589 | |||
| 4dc8fef9c1 | |||
| 2c02645ec7 | |||
| 40bad327fe | |||
| f5653d3c4d | |||
| 4026d7818b | |||
| a0fda2f058 | |||
| 93546e2d5c | |||
| 85a562713a | |||
| 4e9beb1a5d | |||
| 522333e0f5 | |||
| b4c4d0264c | |||
| 21c3187fa3 | |||
| b377cfcdef | |||
| 5d384e531d | |||
| 2b00c64973 | |||
| 7c777dea22 | |||
| 9d0c77917d | |||
| 6d40ced435 | |||
| 0675ee7f79 | |||
| 0aec15a848 | |||
| 2ff01a99ac | |||
| 0596ed7739 | |||
| d8beb99964 | |||
| 648dfd8d75 | |||
| 279a7a3fc8 | |||
| a62aede62f | |||
| b07bbbc1c9 | |||
| 547ce87eaa | |||
| c206456d00 | |||
| 590dd13f8f | |||
| afd0e70479 | |||
| b9166b35b3 | |||
| 333fa51862 | |||
| ec6d256707 | |||
| 86764d92a6 | |||
| cf1c9b3e5e | |||
| b15d7179b6 | |||
| 72312f1249 | |||
| 373198f628 | |||
| e96d8c774b | |||
| 8e221e183d | |||
| 2249c49303 | |||
| 388362d318 | |||
| a554ea8e8b | |||
| 090719deee | |||
| e29a162a85 | |||
| e17fa9edc2 | |||
| e57529257e | |||
| 866f9228ef | |||
| 3a38a8b89b | |||
| 0509a23881 | |||
| cbb0741ab9 | |||
| 716bb0fac1 | |||
| acb193bd7b | |||
| 0a09beb731 | |||
| 93dca3df73 | |||
| 008143a3da | |||
| 30a4db432e | |||
| 65546baf01 | |||
| 8be5069490 | |||
| 802410644b | |||
| e74b172372 | |||
| 23ac59588e | |||
| 7f6e9de5e5 | |||
| 143906ae9d | |||
| b003371456 | |||
| 1e6fa37a10 | |||
| 935786a161 | |||
| 23c4d07432 | |||
| 77107ef1eb | |||
| cac4238b12 | |||
| 8c402c2dc3 | |||
| 9bff95826a | |||
| fc0f7cecc4 | |||
| 0b5c5ce17e | |||
| 9aa61532ff | |||
| 3271557f8a | |||
| 9587342129 | |||
| 9b4821308d | |||
| 663978906a | |||
| 60f3308b8b | |||
| a305d6e725 | |||
| 1feff344b8 | |||
| 4fa4ffae54 | |||
| 4ecd72de6e | |||
| 3ec495c3fc | |||
| 5efc437384 | |||
| a777f4d3b1 | |||
| ff139808ff | |||
| 07136f9be8 | |||
| 35fc2295e9 | |||
| 2b262ccca3 | |||
| d42aab3dff | |||
| 612c347498 | |||
| 3c4540131a | |||
| 43317f6e02 | |||
| 523742d8de | |||
| 9516ee910e | |||
| 3ea31a3862 | |||
| 649411a4ef | |||
| a0e60e5453 | |||
| e3f1f40a78 | |||
| d0177f4c52 | |||
| 84a3a55a03 | |||
| 048075b47a | |||
| fab097c92a | |||
| 9d26bd8c04 | |||
| 664d243c23 | |||
| 9a0906655d | |||
| 13d60f2741 | |||
| 7d4de64d0b | |||
| 9ada2d9884 | |||
| a5f1951cfb | |||
| 98850e4c5c | |||
| 709e1f925d | |||
| b11ae331a5 | |||
| 3ba4b26b99 | |||
| b864077017 | |||
| d411dff1c0 | |||
| 7fc7453450 | |||
| 1799971885 | |||
| b999911292 | |||
| 29e0f9ad21 | |||
| d821b7eb8b | |||
| 272a214304 | |||
| 7f15b351ee | |||
| 5a6a12a14a | |||
| 01493c7063 | |||
| 244055fcb7 | |||
| 0415af5f31 | |||
| f73372c924 | |||
| 65cdc24e37 | |||
| 1b2d439651 | |||
| b383942c69 | |||
| 73bd109abb | |||
| 33ffd5dedb | |||
| 7422fe43b8 | |||
| 879c45a5b3 | |||
| db0d205374 | |||
| f20594a2b5 | |||
| ee017f4bc6 | |||
| 4d089f9a0e | |||
| e7f9c5c2ac | |||
| 2df8d38c2f | |||
| 17ac44d610 | |||
| 3c52c2ae3f | |||
| 5a5115e29f | |||
| 5c7ff1c97b | |||
| cc820a3595 | |||
| 48fff48d28 | |||
| 1684243e57 | |||
| 45e14781eb | |||
| 5ceea7b4a5 | |||
| 17e716b4c3 | |||
| adfdbf3246 | |||
| 03b757d60e | |||
| 12c6d77990 | |||
| 8a7373f412 | |||
| df28ff5bdc | |||
| 2afc2beb5d | |||
| 3896bf3aad | |||
| 744ace5ab6 | |||
| 4bf0b74b6c | |||
| 5c6e624ff7 | |||
| 6c0d5a7a10 | |||
| b34cb21f0c | |||
| b77eb7ed0b | |||
| 34193c510e | |||
| 55f1eaf5da | |||
| 9b74b5a367 | |||
| 008922edc6 | |||
| 82edca785f | |||
| b271baecd5 | |||
| 9b48cd2a35 | |||
| 183f6ace88 | |||
| b5987cd6ea | |||
| 6e153a5070 | |||
| 56e59d91dd | |||
| fd91c6811f |
@@ -0,0 +1,93 @@
|
||||
build
|
||||
dist
|
||||
dists
|
||||
renpy.app
|
||||
**/*.rpyc
|
||||
**/*.rpyb
|
||||
**/*.rpymc
|
||||
jedit
|
||||
lint.txt
|
||||
renpy.code
|
||||
traceback.txt
|
||||
doc/common.css
|
||||
doc/images
|
||||
doc/index.html
|
||||
doc/monobook.css
|
||||
doc/monobook2.css
|
||||
doc/reference
|
||||
doc/shared.css
|
||||
doc/tutorials
|
||||
doc/www.renpy.org
|
||||
testing*
|
||||
translations.rpy
|
||||
launchertrans.rpy
|
||||
jcc
|
||||
scite/scite.zip
|
||||
screenshot*
|
||||
.ropeproject
|
||||
release_cardgame.sh
|
||||
cardgame
|
||||
dse.split
|
||||
empty
|
||||
empty-linux-x86.tar.bz2
|
||||
empty-mac.zip
|
||||
empty.zip
|
||||
errors.txt
|
||||
icons
|
||||
iliad-icon.png
|
||||
iliad-work
|
||||
kuroi
|
||||
lsprofcalltree.py
|
||||
manifest.xml
|
||||
mediatest
|
||||
musicroom
|
||||
nobmtest
|
||||
renpy-iliad.sh
|
||||
renpy.kcg
|
||||
renpy.stats
|
||||
renpygame-1.2.zip
|
||||
speedtest
|
||||
styles.txt
|
||||
renpygame-demo/game/saves
|
||||
Lucy Sprites.zip
|
||||
translate
|
||||
close_bugs.py
|
||||
.logplayer
|
||||
scite-6.10.zip
|
||||
scite-renpy-20090803.zip
|
||||
module/cython.sh
|
||||
old_demo
|
||||
opengl.txt
|
||||
Microsoft.VC90.CRT.manifest
|
||||
console.exe
|
||||
msvcr90.dll
|
||||
python26.dll
|
||||
renpy.exe
|
||||
lib/windows-x86
|
||||
doc/*
|
||||
updates/prerelease
|
||||
module/gen
|
||||
log.txt
|
||||
lib/linux-x86
|
||||
lib/python
|
||||
lib/update-version.txt
|
||||
sphinx/game/saves
|
||||
tutorial/game/saves
|
||||
doc
|
||||
unparse.py
|
||||
module/glrtt_fbo.c
|
||||
module/glrtt_fbo.html
|
||||
tutorial/game/cache
|
||||
renpy.exe.log
|
||||
renpy/vc_version.py
|
||||
.pydevproject
|
||||
.project
|
||||
.settings
|
||||
LICENSE.txt
|
||||
template/README.html
|
||||
the_question/README.html
|
||||
tutorial/README.html
|
||||
trace.txt
|
||||
renpy/angle/*.pyx
|
||||
renpy/angle/*.pxd
|
||||
renpy-ppc.zip
|
||||
@@ -1,3 +1,822 @@
|
||||
|
||||
New in Ren'Py 6.10.2
|
||||
--------------------
|
||||
|
||||
Ren'Py now caches the individual words of text that are rendered. This
|
||||
can lead to a speedup in text display when there are many words of
|
||||
text on the screen, and that text is re-displayed, as is the case
|
||||
where the text text speed is not the maximum. This is especially
|
||||
beneficial for eastasian languages, where every character is treated
|
||||
as a word.
|
||||
|
||||
|
||||
The new config.menu_clear_layers variable allows layers to be cleared
|
||||
when entering the game menu. This makes it easier for a layer to have
|
||||
overlay-like things on it when in the game, but not when in the game
|
||||
menu.
|
||||
|
||||
|
||||
The new renpy.cache_pin function pins images into memory, loading them
|
||||
as soon as possible and keeping them loaded. The renpy.cache_unpin function
|
||||
undoes this.
|
||||
|
||||
|
||||
The new config.automatic_images_strip variable can strip out prefixes
|
||||
when automatically defining images.
|
||||
|
||||
|
||||
It's now possible to assign style properties to individual imagemap
|
||||
buttons, by indexing style.imagemap_button. (So for example, one could
|
||||
assign to style.imagemap_button["Start Game"].hover_sound .)
|
||||
|
||||
|
||||
The new voice_replay function replays the voice played on the current
|
||||
interaction. The new voice_can_replay function returns True if a voice
|
||||
can be replayed.
|
||||
|
||||
|
||||
The launcher now accepts a RENPY_DEFAULT_PROJECTS_DIRECTORY, which sets
|
||||
the default for the projects directory, if it has not already been set
|
||||
by the user. It also will report an error when creating a project fails,
|
||||
rather than producing a traceback.
|
||||
|
||||
|
||||
The launcher now links to the new Ren'Py Games List, at
|
||||
http://games.renpy.org/.
|
||||
|
||||
|
||||
Previously, it was impossible to pass an arguments list to a call
|
||||
expression. Now, we allow the pass keyword to be used to distinguish
|
||||
the two, using code like:
|
||||
|
||||
call expression foo pass (bar, baz)
|
||||
|
||||
|
||||
Ren'Py will now not show the click-to-continue indicator when a
|
||||
character is called with interact=False, unless that character is also
|
||||
called with ctc_force=True.
|
||||
|
||||
|
||||
Ren'Py now builds zip files in distributions 64k at a time.
|
||||
|
||||
|
||||
Ren'Py will now ignore music files that do not exist. Previously, it
|
||||
could loop trying to play them. (This would increase CPU usage, rather
|
||||
than causing a crash.)
|
||||
|
||||
|
||||
The following numbered bugs were fixed:
|
||||
|
||||
* lp:501351 - Displaying a Frame() with tile=True crashes
|
||||
* lp:506322 - MoveTransition is not applied to overlay even when explicitly stated
|
||||
|
||||
In addition:
|
||||
|
||||
* Fixed a bug that caused pixellate to crash.
|
||||
* Fixed a bug that caused the overlay to display twice in some cases.
|
||||
* Fix an infinite loop that could rarely occur when rolling back or saving.
|
||||
|
||||
|
||||
|
||||
New in Ren'Py 6.10.1
|
||||
--------------------
|
||||
|
||||
Images and other surfaces are now created with a 1px transparent border
|
||||
around them. This change allows transform to work correctly with a 1:1
|
||||
scale, where as previously Ren'Py would blur the image slightly, while
|
||||
trying to ensure it never accessed a pixel outside of the original
|
||||
image bounds.
|
||||
|
||||
|
||||
ATL now has a "function" statement, which allows an ATL transform to
|
||||
use the same functions that are supplied to Transform.
|
||||
|
||||
|
||||
The layout.imagemap_main_menu and layout.imagemap_load_save functions
|
||||
now allow one to define variant screens. This allows one to select an
|
||||
imagemap main menu screen to use, or to define different screens for
|
||||
loading and saving.
|
||||
|
||||
|
||||
The overlay semantics were changed such that transitions apply to overlays
|
||||
in the same way they apply to everything else. (So, for example, dissolves
|
||||
will apply to overlays.)
|
||||
|
||||
|
||||
The image text tag can now take any textual image representation. So
|
||||
something like {image=eileen happy} is legal, if odd.
|
||||
|
||||
|
||||
The following numbered bugs were fixed:
|
||||
|
||||
lp:366412 - Ren'Py could crash on shift+R at the main menu, under some circumstances.
|
||||
|
||||
lp:485631 - The transfer of state from a transfrom to a transform supplied as part of an image didn't work.
|
||||
|
||||
lp:487688 - non-ASCII characters didn't display in the window title bar.
|
||||
|
||||
lp:487701 - Ren'Py didn't work when in a directory containing non-ASCII characters.
|
||||
|
||||
lp:488814 - Scaling to the same size could blur an image.
|
||||
|
||||
lp:489212 - Interpolation didn't work when the starting value was None.
|
||||
|
||||
lp:493062 - One could roll back into an imagemap main menu.
|
||||
|
||||
lp:494779 - The window shown state wasn't being tracked correctly.
|
||||
|
||||
lp:494820 - Error handling in ATL hid too many error messages.
|
||||
|
||||
A major bug that caused Ren'Py to fail as scaling was enabled was fixed.
|
||||
|
||||
A number of minor bugs revealed by pyflakes were fixed.
|
||||
|
||||
|
||||
|
||||
New in Ren'Py 6.10.0
|
||||
--------------------
|
||||
|
||||
The demo game is in the process of being converted into a new tutorial
|
||||
game, which shows recommended Ren'Py code examples rather than
|
||||
requiring the user to learn from the game itself's source code.
|
||||
|
||||
|
||||
Ren'Py now supports an Animation and Transformation language
|
||||
(ATL). This provides a convenient syntax for animating an image, or
|
||||
transforming it by positioning it, rotating it, zooming it, and
|
||||
adjusting its opacity.
|
||||
|
||||
To a large extent, ATL supersedes the Animation, TransitionAnimation,
|
||||
anim.SMAnimation, anim.Blink, Zoom, FactorZoom, RotoZoom, SizeZoom,
|
||||
LiveCrop, Move, Pan, Position, Motion, and Revolve functions, and
|
||||
perhaps others. As it allows properties to be scripted, ATL is more
|
||||
powerful that all of these functions. (For example, many of these
|
||||
functions can only do relatively simple repeats, while ATL allows
|
||||
complex patterns to be easily specified.)
|
||||
|
||||
ATL can be used in the new transform statement, and new variants of
|
||||
the image, scene, and show statements.
|
||||
|
||||
|
||||
When an image is shown, Ren'Py checks to see if there was a previous
|
||||
image with that tag, and if that image used a transform. If this is
|
||||
true, Ren'Py does two things:
|
||||
|
||||
# If the new image is not a transform, it wraps it in a transform.
|
||||
# The transform is initialized to have the properties of the old transform.
|
||||
|
||||
The generally has the effect of "remembering" the position of images
|
||||
shown on the screen. In some cases, this memory effect may override a
|
||||
position encoded into an image. In that case, the image must be hidden
|
||||
and shown again.
|
||||
|
||||
|
||||
The default positions (left, right, center, truecenter, offscreenleft,
|
||||
and offscreenright) are now defined as ATL transforms. This means that showing
|
||||
an image at such a position will cause the position to be remembered.
|
||||
|
||||
|
||||
Support for Arabic and Hebrew has been added to Ren'Py. To enable this
|
||||
support, config.rtl needs to be set to True. It may also be necessary
|
||||
to set various style properties to do a credible job of right-to-left
|
||||
layout.)
|
||||
|
||||
|
||||
The freetype library has been updated, and we have added support for
|
||||
the use of TrueType collections. Using a name of 0@font.ttc will get
|
||||
the first font in the collection, 1@font.ttc will get the second font,
|
||||
and so on.
|
||||
|
||||
|
||||
The displayable code has been adjusted to consider strings that do not
|
||||
contain at least one dot as image references. Now, one can write
|
||||
"eileen happy" to refer to an image with that name.
|
||||
|
||||
|
||||
A pause statement has been added to Ren'Py.
|
||||
|
||||
|
||||
The new config.auto_load variable allows you to specify a save file
|
||||
that is automatically loaded when Ren'Py starts. For example, setting
|
||||
this to "1" loads the game in save slot 1. This is intended for use by
|
||||
developers, so they can easily return to a point in the game after
|
||||
restarting Ren'Py.
|
||||
|
||||
|
||||
The layout.imagemap_yesno_prompt now supports a prompt_images
|
||||
argument, which is can be used to specify images to replace the
|
||||
text of a yes/no prompt.
|
||||
|
||||
|
||||
The new ui.tag function allows one to specify the image tag of a UI
|
||||
widget. This can have positive interactions with transforms.
|
||||
|
||||
|
||||
Ren'Py now has a define statement, which combines into a single
|
||||
statement running code at init time, and assigning it to a
|
||||
variable. Ren'Py keeps track of these definitions, which may in the
|
||||
future make it easier for editors to determine where something is
|
||||
defined.
|
||||
|
||||
|
||||
The new config.window_overlay_functions variable contains a list of
|
||||
functions that should be called only when once the dialogue window has
|
||||
been shown.
|
||||
|
||||
|
||||
The new config.automatic_images variable, when set correctly, will
|
||||
cause Ren'Py to automatically define images for appropriately-named
|
||||
image files found in the archives and game directory.
|
||||
|
||||
|
||||
Python blocks are now compiled in a mode that allows the python "with"
|
||||
statement. Container displayables now support the context manager
|
||||
protocol, automatically closing at the end of a with block. (Note
|
||||
that the python with statement postdates the Ren'Py with statement,
|
||||
and has totally different semantics.)
|
||||
|
||||
|
||||
The play and queue statements now take optional loop and noloop
|
||||
modifiers, which force looping (or lack of looping) on that channel.
|
||||
The play statement takes an if_changed modifier, which prevents a song
|
||||
from being restarted if it is already playing on the channel. [doc]
|
||||
|
||||
|
||||
Ren'Py now allows save games to be deleted. To do this, select a save
|
||||
game (either with the keyboard, or by hovering the mouse over it), and
|
||||
hit delete.
|
||||
|
||||
|
||||
Buttons now take a keymap argument, which specifies an alternate
|
||||
keymap that is used when the button is focused.
|
||||
|
||||
|
||||
Added the Image Location Picker to the Developer (shift+D) menu. This
|
||||
tool lets the user pick an image, and then pick locations that
|
||||
image. It displays the mouse coordinates, imagemap rectangle, and
|
||||
cropping rectangle.
|
||||
|
||||
|
||||
Added a FPS meter to the Developer (shift+D) menu.
|
||||
|
||||
Added a .001s sleep for frames that are framerate-limited. This should
|
||||
prevent Ren'Py from consuming all CPU unless the game is CPU-bound.
|
||||
|
||||
|
||||
Added config.file_open_callback, which allows Ren'Py to load files
|
||||
from user-definable archive types.
|
||||
|
||||
|
||||
Added the renpy.get_roll_forward function, which is the infrastructure
|
||||
needed to create a button that lets the user roll forward.
|
||||
|
||||
|
||||
Changed MoveTransition to preserve the timebases of the thing being moved
|
||||
in all circumstances.
|
||||
|
||||
|
||||
Ren'Py is now built using SDL-1.2.13. On Linux systems with pulseaudio
|
||||
support, it will use pulseaudio for audio output.
|
||||
|
||||
|
||||
Fixed a bug with archive files that could cause crashing in some
|
||||
circumstances.
|
||||
|
||||
Fixed a bug that prevented {w=1} from working.
|
||||
|
||||
Fixed a bug that prevented style.rebuild from working.
|
||||
|
||||
Fixed a potential segfault bug with certain transforms, zooms, and
|
||||
rotations.
|
||||
|
||||
|
||||
New in Ren'Py 6.9.3
|
||||
-------------------
|
||||
|
||||
This release includes Launcher2, a near-total rewrite of the Ren'Py
|
||||
launcher. Among the more important changes are:
|
||||
|
||||
* The launcher now supports a project directory. It is no longer
|
||||
necessary to move projects around when upgrading Ren'Py.
|
||||
|
||||
* The launcher has support for selecting the editor to use. While we
|
||||
ship with jEdit support, other editors can be downloaded from the
|
||||
Ren'Py web site.
|
||||
|
||||
* When building distributions, the launcher now allows the user to
|
||||
choose which distributions are built.
|
||||
|
||||
* The Macintosh distribution now places all non-documentation files
|
||||
inside a single application.
|
||||
|
||||
* There is a new combined distribution, which includes support for
|
||||
Windows, Linux, and Macintosh in a single zip file.
|
||||
|
||||
|
||||
The new ui.detached function allows one to use the ui functions to
|
||||
define displayables without adding them to a layer.
|
||||
|
||||
|
||||
Ren'Py will now search for a directory named "Ren'Py Data" in the
|
||||
directories above your Ren'Py installation. If found, save data will
|
||||
be placed in that directory, rather than the system-specific default
|
||||
location. This should help make it easier to develop Ren'Py games when
|
||||
using a USB drive.
|
||||
|
||||
|
||||
The save location for screenshots has now been standardized. It is now
|
||||
the directory containing the executable used to start Ren'Py, be it a
|
||||
.exe, .py, .sh, or .app. (The latter is handled specially.)
|
||||
|
||||
|
||||
Allow config.layer_clipping to specify layers that are larger than the
|
||||
screen.
|
||||
|
||||
|
||||
The various layouts now change the mouse to the gamemenu or mainmenu
|
||||
mouse, as appropriate.
|
||||
|
||||
|
||||
This distribution include a new NVL-mode tutorial, teaching people how
|
||||
to make NVL-mode games.
|
||||
|
||||
|
||||
Fixed a long-standing problem that could cause Rollback to operate
|
||||
incorrectly with object that were unreachable at the time of the
|
||||
Rollback.
|
||||
|
||||
Fixed a problem that prevented animations from displaying correctly
|
||||
when the animation was displayed more than once.
|
||||
|
||||
Fixed a problem that could cause children of the various
|
||||
MultiBox-based displayables (Fixed, HBox, VBox, and LiveComposite) to
|
||||
display animations incorrectly.
|
||||
|
||||
|
||||
New in Ren'Py 6.9.2
|
||||
-------------------
|
||||
|
||||
The semantics for play and queue have changed slightly. Now, when a
|
||||
play statement is followed by one or more queue statements, the first
|
||||
file in each play or queue statement will be played. For example:
|
||||
|
||||
play music "a.ogg"
|
||||
queue music "b.ogg"
|
||||
queue music "c.ogg"
|
||||
|
||||
will play "a.ogg", "b.ogg", and then loop "c.ogg". This change also
|
||||
applies to renpy.music.play and renpy.music.queue.
|
||||
|
||||
|
||||
Rollback was changed so that doing anything other than a roll-forward
|
||||
while in rollback mode exits rollback immediately.
|
||||
|
||||
|
||||
The library alias for config has been removed.
|
||||
|
||||
|
||||
Fixed a regression that caused dissolves to be terribly slow.
|
||||
|
||||
Fixed a bug that caused Ren'Py to crash when playing music on Windows
|
||||
when Data Execution Prevention was enabled. DEP is enabled by default
|
||||
on 64-bit Windows Vista.
|
||||
|
||||
Fixed a bug that caused Ren'Py to crash when a window icon was used on
|
||||
a computer with a 16-bit or 8-bit screen depth.
|
||||
|
||||
Fixed a bug that caused ui.sizer to malfunction.
|
||||
|
||||
Fixed a repeated word in "The Question".
|
||||
|
||||
Fixed a bug that could cause it to take two tries to define a joystick
|
||||
button.
|
||||
|
||||
|
||||
|
||||
New in Ren'Py 6.9.1
|
||||
-------------------
|
||||
|
||||
The music and video playback code has been completely rewritten. The
|
||||
new implementation uses the ffmpeg library. It includes the following
|
||||
features:
|
||||
|
||||
* Support for ogg, mp3, mp2, wav, and flac audio.
|
||||
|
||||
* Support for theora, mpeg4 part 2 (including DivX and Xvid), mpeg2,
|
||||
and mpeg1 video.
|
||||
|
||||
* Support for an arbitrary number of named channels, replacing the
|
||||
previous eight numbered channels.
|
||||
|
||||
* Audio files are now automatically converted to the output sampling
|
||||
rate (by default, 44100hz). This prevents the problems that would
|
||||
previously crop up when playing audio sampled at other rates.
|
||||
|
||||
* The play, queue, and stop statements now take a channel name as the
|
||||
second argument, which makes using user-defined channels easier.
|
||||
|
||||
As part of this rewrite, we have eliminated support for mod formats,
|
||||
as they are not supported by ffmpeg.
|
||||
|
||||
Please read the reference manual documentation for Audio and Movies to
|
||||
learn the new interface.
|
||||
|
||||
The new code requires some changes in the saved data. As a result,
|
||||
loading a file saved with a prior version of Ren'Py may lead to a lack
|
||||
of music until the next track is played.
|
||||
|
||||
|
||||
|
||||
The new window statement allows one to control if an empty window is
|
||||
shown when no character is speaking. Specifically, the
|
||||
|
||||
window show [transition]
|
||||
|
||||
statement shows the window, and the
|
||||
|
||||
window hide [transition]
|
||||
|
||||
statement hides it. Both can take an optional
|
||||
transition. config.empty_window is responsible for displaying the
|
||||
window, while config.window_show_transition and
|
||||
config.window_hide_transition are default transitions. The state of
|
||||
the window can be determined by testing _window. The
|
||||
renpy.shown_window function can be called to suppress displaying the
|
||||
empty window, and is called automatically when characters speak.
|
||||
|
||||
|
||||
Hotspots for the game menu buttons can be defined as part of
|
||||
layout.imagemap_load_save, layout.imagemap_preferences, and
|
||||
layout.imagemap_yesno_prompt. Doing so prevents layout.navigation from
|
||||
being called for that screen. It also allows opaque imagemaps to be
|
||||
used, rather than forcing them to be transparent to allow the
|
||||
navigation to show through.
|
||||
|
||||
|
||||
There is a new config.windows_icon variable, that lets one set the
|
||||
window icon for Windows separately from Mac OS X and Linux.
|
||||
|
||||
|
||||
Ren'Py now automatically scales itself down when it detects that the
|
||||
game window is too large for the screen.
|
||||
|
||||
|
||||
The define.move_transitions function can now pass keyword arguments to
|
||||
the moves it creates. The most useful thing with this is to pass
|
||||
subpixel=True, in order to create subpixel move transitions.
|
||||
|
||||
|
||||
The Motion (including Move and Pan), Zoom, RotoZoom, and FactorZoom
|
||||
displayables now use the style.motion style, which now has xanchor and
|
||||
yanchor both set to 0. This gives these movements the same semantics
|
||||
when used inside an image clause as they have outside one.
|
||||
|
||||
|
||||
im.Grayscale and im.Sepia now take properties, so they can be
|
||||
positioned.
|
||||
|
||||
|
||||
The new renpy.get_placement function returns information about the
|
||||
placement of displayables.
|
||||
|
||||
|
||||
Improved the render management code, so there should no longer be any
|
||||
leaks reported during shutdown.
|
||||
|
||||
|
||||
Deal with the case where a bmfont has a negative offset for the first
|
||||
character in a string.
|
||||
|
||||
|
||||
Added more verbose diagnostics when illegal statements are run in the
|
||||
init phase.
|
||||
|
||||
|
||||
Added _rollback, which controls if rollback is enabled.
|
||||
|
||||
|
||||
Added a target parameter to renpy.full_restart, which allows the main
|
||||
menu screen to be selected after a restart.
|
||||
|
||||
|
||||
|
||||
Fixed a bug that caused layout.imagemap_main_menu to call a label even
|
||||
though there was a button with the same name.
|
||||
|
||||
Fixed a bug that prevented Zoom from working in non-bilinear mode.
|
||||
|
||||
Fixed a bug that could cause buttons not not consume events when using
|
||||
an imagemap main menu.
|
||||
|
||||
Fixed a bug that caused Transform to produce an incorrectly-sized
|
||||
render.
|
||||
|
||||
Fixed a bug that could cause crashing when rolling back to a Zoom with
|
||||
an after_child.
|
||||
|
||||
Fixed a bug that could cause segfaults when saving overly-complicated
|
||||
images.
|
||||
|
||||
|
||||
New in Ren'Py 6.9.0
|
||||
-------------------
|
||||
|
||||
This release features a rewritten rendering system. The rendering
|
||||
subsystem is what manages drawing to the screen. There have been
|
||||
several major improvements:
|
||||
|
||||
* The render system has been simplified. Although still complex, it's
|
||||
now easier to understand than the old system, while also being
|
||||
naturally a bit faster.
|
||||
|
||||
* That being said, the render system now focuses more on framerate
|
||||
consistency than raw speed.
|
||||
|
||||
* The render system now supports subpixel drawing, drawing images at
|
||||
locations that are not integer pixel boundaries. This is enabled by
|
||||
setting the subpixel style property to True for a displayable. (It
|
||||
makes the most sense to do this for Move and Pan, and less sense to
|
||||
do this for non-moving displayables.)
|
||||
|
||||
* The render system supports specifying subpixel placement of
|
||||
displayables. This is done using the new absolute type. (A
|
||||
floating-point position is still interpreted as a fraction of the
|
||||
area in which the displayable is placed.)
|
||||
|
||||
* The render system supports a rotate-zoom-alpha mode, in which allows
|
||||
a displayable to be rotated, zoomed, and have its alpha
|
||||
changed. When this mode is used, the cost remains constant, even
|
||||
when multiple transformations are composed. Currently, this is only
|
||||
used by Transform and ui.transform.
|
||||
|
||||
* The render system supports rotating and scaling focusable objects.
|
||||
|
||||
Improved the transform routine used by RotoZoom and Transform. It's
|
||||
now both more accurate and faster. On Intel computers, it is now
|
||||
accelerated using MMX instructions.
|
||||
|
||||
|
||||
The image statement now implicitly places itself inside an init block
|
||||
if it's not inside an init block to begin with. The code:
|
||||
|
||||
image bg world = "world.jpg"
|
||||
|
||||
is now equivalent to:
|
||||
|
||||
init 990:
|
||||
image bg world = "world.jpg"
|
||||
|
||||
|
||||
When compiling python blocks containing strings with a unicode
|
||||
character in them, Ren'Py will automatically prepend a u to any string
|
||||
that's missing it. This should make life easier for users of non-ASCII
|
||||
languages.
|
||||
|
||||
|
||||
The new ui.autobar function makes it easy to make a bar that
|
||||
varies between two values over time.
|
||||
|
||||
|
||||
The new renpy.Container class can be subclassed to create a user-defined
|
||||
displayable thatr contains other displayables, like Transforms.
|
||||
|
||||
|
||||
The new im.FactorScale image manipulator allows images to be scaled by
|
||||
a specified factor at preload time. This is generally faster than doing the
|
||||
equivalent scaling at display time with FactorZoom.
|
||||
|
||||
|
||||
The new renpy.sound.set_pan function allows sound and music to be
|
||||
smoothly panned over time.
|
||||
|
||||
|
||||
The new config.label_callback variable allows a function to be called
|
||||
whenever control reaches a label. It can distinguish between jumps to
|
||||
that label and control falling through.
|
||||
|
||||
|
||||
There have been a couple of places where properly documented functions
|
||||
have superseded semi-documented calls into the Ren'Py internals:
|
||||
|
||||
The renpy.game_menu and ui.gamemenus functions are now the preferred ways
|
||||
of getting access to the game menu.
|
||||
|
||||
The ui.jumps function now takes a transition argument, allowing it to subsume
|
||||
the undocumented _intra_jumps.
|
||||
|
||||
|
||||
Ren'Py now looks for the file environment.txt in the directory
|
||||
containing Ren'Py itself. If it finds it, it loads the file as a
|
||||
python file, and uses it to set the default values of environment
|
||||
variables. This allows things like the editor or the scale factor to
|
||||
be set even on platforms that don't make it easy to change environment
|
||||
variables globally.
|
||||
|
||||
|
||||
The reporting of parse errors involving missing quotes has been
|
||||
improved.
|
||||
|
||||
|
||||
Changed the behavior of overlays during transitions. Now, both the old
|
||||
and new screens will use the new overlay. Previously, the overlay was
|
||||
cleared out during a transition, which didn't work well, as (for
|
||||
example) a dissolve would cause the overlay to blink out and then
|
||||
dissolve back in again.
|
||||
|
||||
|
||||
MoveTransition and define.move_transitions have been changed to take
|
||||
a layers argument, giving the list of layers the transition applies
|
||||
to. By default, this is only the master layer, which is a change in
|
||||
their behavior.
|
||||
|
||||
|
||||
Calling theme.roundrect() no longer implies layout.button_menu().
|
||||
|
||||
|
||||
Ren'Py now autosaves when entering the quit prompt, and will not actually
|
||||
quit until this autosave is complete.
|
||||
|
||||
|
||||
The default framerate limit (config.framerate) has been raised to
|
||||
100fps. This make tearing less noticable than on a 60hz screen.
|
||||
|
||||
|
||||
Added renpy.partial as a version of renpy.curry that requires two
|
||||
function calls, rather than three.
|
||||
|
||||
|
||||
Fixed a divide by zero error that occured when Alpha was used for 0
|
||||
seconds.
|
||||
|
||||
|
||||
Libvorbis has been upgraded to version 1.2.0.
|
||||
|
||||
|
||||
To reduce distribution size, OGG Speex support was dropped.
|
||||
|
||||
|
||||
New in Ren'Py 6.8.1
|
||||
-------------------
|
||||
|
||||
Added support for the iRex iLiad ebook reader platform. This required
|
||||
adding the following features, which may prove useful for other
|
||||
platforms:
|
||||
|
||||
Added support for the RENPY_SCALE_WIDTH environment variable, which
|
||||
allows the game to be scaled to a specific width, if it's larger.
|
||||
|
||||
Added support for the RENPY_LESS_MEMORY environment variable, which
|
||||
reduces the amount of memory used by Ren'Py in exchanged for reduced
|
||||
speed.
|
||||
|
||||
Added support for the RENPY_LESS_UPDATES environment variable, which
|
||||
tries to reduce the number of screen updates to one per interaction.
|
||||
|
||||
Added support for the RENPY_LESS_MOUSE environment variable, which
|
||||
prevents the mouse from being shown.
|
||||
|
||||
The iLiad support was sponsored by Hixbooks.
|
||||
|
||||
|
||||
It is now possible to rebuild the distribution of a game by unzipping
|
||||
it underneath the Ren'Py directory, selecting it as a project, and
|
||||
building the distributions. This makes it easy to upgrade the version
|
||||
of Ren'Py used by a game, or to build a version of it that works on
|
||||
your favorite platform.
|
||||
|
||||
|
||||
The new Alpha function can be used to change the alpha level of a
|
||||
displayable. (im.Alpha can only be used with other image
|
||||
manipulators.)
|
||||
|
||||
|
||||
User-defined statements are now documented in the reference manual,
|
||||
making them officially supported.
|
||||
|
||||
A user-defined statement can now be used as the default
|
||||
statement. This allows you to replace the say statement with an
|
||||
alternate of your own devising.
|
||||
|
||||
|
||||
Fixed a bug that occured when space characters were inserted
|
||||
immediately after a newline.
|
||||
|
||||
Fixed a problem displaying a presplash image on the mac platform.
|
||||
|
||||
|
||||
New in Ren'Py 6.8.0
|
||||
-------------------
|
||||
|
||||
Ren'Py now includes its own font-handling library, derived from
|
||||
pygame.font/SDL_ttf, which it uses in place of them when
|
||||
possible. This gives two advantages:
|
||||
|
||||
* Outlined text is now possible. The new outlines style property
|
||||
allows you to specify one or more outlines, including offset
|
||||
ones. This allows for several fairly complicated text effects, similar
|
||||
to what you'd see in modern subtitles.
|
||||
|
||||
* The bug preventing fonts from being archived has probably been
|
||||
fixed. It should now be possible to include a font in an archive, and
|
||||
have that work. The archiver has been modified to allow ttf files to
|
||||
be archived again. Please report any bugs/crashes that occur.
|
||||
|
||||
|
||||
There is now a new justify style property, that causes lines of text
|
||||
to have additional whitespace inserted between words so that the left
|
||||
and right margins are even, except on the last line of a paragraph.
|
||||
|
||||
|
||||
Ren'Py now supports the MudgeFont and BMFont image-based font file
|
||||
formats. The new renpy.register_mudgefont function is used to register
|
||||
a MudgeFont, and the renpy.register_bmfon function is used to register
|
||||
a BMFont.
|
||||
|
||||
|
||||
Newly-created games will have a Help option on the main and game
|
||||
menus. This is controlled by the config.help variable. By default
|
||||
the help system shows the README.html file in the game's base directory.
|
||||
|
||||
|
||||
If the file icon.ico is present in the base directory, it will be used
|
||||
as the icon of the windows exe when building the windows
|
||||
distribution. Similarly, the file icon.icns will be used as the icon
|
||||
of the Macintosh application. (Note that .icns is a different file format
|
||||
from .ico.)
|
||||
|
||||
|
||||
On Mac OS X, Ren'Py will not change the application icon unless
|
||||
config.window_icon is set. More specifically, it will default to the
|
||||
launcher icon rather than a generic pygame icon.
|
||||
|
||||
|
||||
The Macintosh application will now show the name of the game in the
|
||||
menu bar, rather than "Ren'Py Launcher".
|
||||
|
||||
|
||||
The "Continue Game" option on the main menu has been renamed "Load
|
||||
Game", for consistency with the game menu.
|
||||
|
||||
|
||||
When config.developer is set and an undefined image is used in a show
|
||||
or scene statement, a list of undefined images will appear centered at
|
||||
the top of the screen. A black screen (configurable with
|
||||
config.missing_background) will be shown instead of any missing
|
||||
background. This makes it easier to write a script before all images
|
||||
are present.
|
||||
|
||||
|
||||
The newly-documented Style.set_parent method lets you change the
|
||||
parent of a style. The new style.rebuild function allows styles to be
|
||||
rebuilt even after the game has begun running, with some
|
||||
caveats. (Changes are not persisted, for one thing.)
|
||||
|
||||
|
||||
The new unscrollable style property allows one to choose how
|
||||
unscrollbable scrollbars are displays. None keeps the current
|
||||
behavior, which shows the bar normally. If set to "insensitive", the
|
||||
bar becomes insensitive, while if set to "hide", the bar is not
|
||||
drawn at all.
|
||||
|
||||
|
||||
The new renpy.easy_displayable method can be used by user-defined
|
||||
displayables to convert strings into Solid or Image displayables.
|
||||
|
||||
|
||||
Alt-F4 and Command-Q now trigger the quit event, as if you pressed the
|
||||
quit button on the top of the window. The first press brings up the
|
||||
quit prompt, and a second press forcibly terminates the game.
|
||||
|
||||
Alt-M and Command-M iconify the window.
|
||||
|
||||
|
||||
The new RENPY_SCREENSHOT_PATTERN environment variable lets you
|
||||
configure the name of screenshot files. Ren'Py can now write out
|
||||
screenshots as JPGs, as well as PNGs.
|
||||
|
||||
|
||||
Several of the libraries underlying Ren'Py have been updated. Pygame
|
||||
has been updated to version 1.8.1, while Freetype is now at version
|
||||
2.3.7.
|
||||
|
||||
|
||||
The presplash code now looks for presplash.jpg in the game directory
|
||||
if presplash.png is not found.
|
||||
|
||||
|
||||
On Windows, config.window_icon will be scaled to 32x32 if it is wider
|
||||
than 32 pixels. This allows the same icon to be used across platforms.
|
||||
|
||||
|
||||
Custom mouse cursors should now be properly hidden when the mouse
|
||||
leaves the window. Previously, this failed to work on the Mac OS X
|
||||
platform.
|
||||
|
||||
|
||||
The launcher has been moved into the launcher/ directory. This really
|
||||
shouldn't matter much, but may affect packaging and translation.
|
||||
|
||||
|
||||
New in Ren'Py 6.7.1
|
||||
-------------------
|
||||
|
||||
@@ -48,11 +867,20 @@ what to archive. This makes it easier to break the files up into
|
||||
multiple archives, in a single game.
|
||||
|
||||
|
||||
The new renpy.copy_images function copies images with one prefix to a
|
||||
second prefix.
|
||||
|
||||
|
||||
The launcher will no longer include directories beginning with a dot
|
||||
(like .svn and .bzr) when copying the template directory to create a
|
||||
new project.
|
||||
|
||||
|
||||
This version includes a refresh of the character art included with
|
||||
"The Question". The new art is by Deji, and the full-color version of
|
||||
the art is available from http://wiki.renai.us/.
|
||||
|
||||
|
||||
|
||||
New in Ren'Py 6.7.0
|
||||
-------------------
|
||||
@@ -3966,4 +4794,3 @@ controls which transitions are performed.
|
||||
|
||||
Added a Pan function which can be used in an at clause. This allows us
|
||||
to pan over a background image.
|
||||
|
||||
|
||||
@@ -1,793 +0,0 @@
|
||||
Copyright 2004-2007 PyTom <pytom@bishoujo.us>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation files
|
||||
(the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
(The above is the MIT License)
|
||||
|
||||
Please see each individual source file for a list of copyright
|
||||
holders. The pictures of Eileen in the demo are Copyright 2006
|
||||
Piroshki, under the same terms.
|
||||
|
||||
The Ren'Py module, the Ren'Py windows binaries, and the various Ren'Py
|
||||
launchers may contain code taken from the following projects:
|
||||
|
||||
* Python (Python License)
|
||||
* Pygame (LGPL)
|
||||
* SDL (LGPL)
|
||||
* SDL_image (LGPL)
|
||||
* SDL_sound (LGPL)
|
||||
* SDL_ttf (LGPL)
|
||||
* SDL_mixer (LGPL)
|
||||
* Freetype (LGPL)
|
||||
* jpeg (JPEG License)
|
||||
* libmodplug (Public Domain)
|
||||
* libogg (Xiph.org License)
|
||||
* libpng (PNG license)
|
||||
* libvorbis (Xiph.org License)
|
||||
* smpeg (LGPL)
|
||||
* speex (Xiph.org License)
|
||||
* zlib (Zlib License)
|
||||
* bzip2 (Bzip2 License)
|
||||
* pyobjc (MIT License)
|
||||
|
||||
The Linux launcher may also include code from:
|
||||
|
||||
* directfb (LGPL)
|
||||
* svgalib (LGPL)
|
||||
|
||||
For the purpose of LGPL compliance, the source code to all LGPL
|
||||
software we depend on is either in the Ren'Py package (available from
|
||||
http://www.renpy.org/), or in the renpy-deps package
|
||||
(http://www.renpy.org/dl/lgpl/). We believe compliance can be achieved
|
||||
by including a copy of this license with every copy of Ren'Py you
|
||||
distribute, and referring to it in your project's README file.
|
||||
|
||||
|
||||
GNU Lesser General Public License
|
||||
---------------------------------
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes a de-facto standard. To achieve this, non-free programs must
|
||||
be allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at least
|
||||
three years, to give the same user the materials specified in
|
||||
Subsection 6a, above, for a charge no more than the cost of
|
||||
performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your school, if any, to sign a "copyright disclaimer" for the library,
|
||||
if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
Python License
|
||||
--------------
|
||||
|
||||
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
||||
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
||||
otherwise using Python 2.3 software in source or binary form and its
|
||||
associated documentation.
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, PSF
|
||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
||||
license to reproduce, analyze, test, perform and/or display publicly,
|
||||
prepare derivative works, distribute, and otherwise use Python 2.3
|
||||
alone or in any derivative version, provided, however, that PSF's
|
||||
License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
|
||||
2001, 2002 Python Software Foundation; All Rights Reserved" are
|
||||
retained in Python 2.3 alone or in any derivative version prepared by
|
||||
Licensee.
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on
|
||||
or incorporates Python 2.3 or any part thereof, and wants to make
|
||||
the derivative work available to others as provided herein, then
|
||||
Licensee hereby agrees to include in any such work a brief summary of
|
||||
the changes made to Python 2.3.
|
||||
|
||||
4. PSF is making Python 2.3 available to Licensee on an "AS IS"
|
||||
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.3 WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
||||
2.3 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.3,
|
||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
6. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
7. Nothing in this License Agreement shall be deemed to create any
|
||||
relationship of agency, partnership, or joint venture between PSF and
|
||||
Licensee. This License Agreement does not grant permission to use PSF
|
||||
trademarks or trade name in a trademark sense to endorse or promote
|
||||
products or services of Licensee, or any third party.
|
||||
|
||||
8. By copying, installing or otherwise using Python 2.3, Licensee
|
||||
agrees to be bound by the terms and conditions of this License
|
||||
Agreement.
|
||||
|
||||
|
||||
Jpeg License
|
||||
------------
|
||||
|
||||
In plain English:
|
||||
|
||||
1. We don't promise that this software works. (But if you find any bugs,
|
||||
please let us know!)
|
||||
2. You can use this software for whatever you want. You don't have to pay us.
|
||||
3. You may not pretend that you wrote this software. If you use it in a
|
||||
program, you must acknowledge somewhere in your documentation that
|
||||
you've used the IJG code.
|
||||
|
||||
In legalese:
|
||||
|
||||
The authors make NO WARRANTY or representation, either express or implied,
|
||||
with respect to this software, its quality, accuracy, merchantability, or
|
||||
fitness for a particular purpose. This software is provided "AS IS", and you,
|
||||
its user, assume the entire risk as to its quality and accuracy.
|
||||
|
||||
This software is copyright (C) 1991-1998, Thomas G. Lane.
|
||||
All Rights Reserved except as specified below.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute this
|
||||
software (or portions thereof) for any purpose, without fee, subject to these
|
||||
conditions:
|
||||
(1) If any part of the source code for this software is distributed, then this
|
||||
README file must be included, with this copyright and no-warranty notice
|
||||
unaltered; and any additions, deletions, or changes to the original files
|
||||
must be clearly indicated in accompanying documentation.
|
||||
(2) If only executable code is distributed, then the accompanying
|
||||
documentation must state that "this software is based in part on the work of
|
||||
the Independent JPEG Group".
|
||||
(3) Permission for use of this software is granted only if the user accepts
|
||||
full responsibility for any undesirable consequences; the authors accept
|
||||
NO LIABILITY for damages of any kind.
|
||||
|
||||
These conditions apply to any software derived from or based on the IJG code,
|
||||
not just to the unmodified library. If you use our work, you ought to
|
||||
acknowledge us.
|
||||
|
||||
Permission is NOT granted for the use of any IJG author's name or company name
|
||||
in advertising or publicity relating to this software or products derived from
|
||||
it. This software may be referred to only as "the Independent JPEG Group's
|
||||
software".
|
||||
|
||||
We specifically permit and encourage the use of this software as the basis of
|
||||
commercial products, provided that all warranty or liability claims are
|
||||
assumed by the product vendor.
|
||||
|
||||
|
||||
Xiph.org License
|
||||
----------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
PNG License
|
||||
-----------
|
||||
|
||||
The PNG Reference Library is supplied "AS IS". The Contributing Authors
|
||||
and Group 42, Inc. disclaim all warranties, expressed or implied,
|
||||
including, without limitation, the warranties of merchantability and of
|
||||
fitness for any purpose. The Contributing Authors and Group 42, Inc.
|
||||
assume no liability for direct, indirect, incidental, special, exemplary,
|
||||
or consequential damages, which may result from the use of the PNG
|
||||
Reference Library, even if advised of the possibility of such damage.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute this
|
||||
source code, or portions hereof, for any purpose, without fee, subject
|
||||
to the following restrictions:
|
||||
|
||||
1. The origin of this source code must not be misrepresented.
|
||||
|
||||
2. Altered versions must be plainly marked as such and must not
|
||||
be misrepresented as being the original source.
|
||||
|
||||
3. This Copyright notice may not be removed or altered from any
|
||||
source or altered source distribution.
|
||||
|
||||
The Contributing Authors and Group 42, Inc. specifically permit, without
|
||||
fee, and encourage the use of this source code as a component to
|
||||
supporting the PNG file format in commercial products. If you use this
|
||||
source code in a product, acknowledgment is not required but would be
|
||||
appreciated.
|
||||
|
||||
|
||||
Zlib License
|
||||
------------
|
||||
|
||||
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.
|
||||
|
||||
Bzip2 License
|
||||
-------------
|
||||
|
||||
This program, "bzip2", the associated library "libbzip2", and all
|
||||
documentation, are copyright (C) 1996-2005 Julian R Seward. All
|
||||
rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. 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.
|
||||
|
||||
3. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
|
||||
4. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,55 +0,0 @@
|
||||
This file contains boilerplate information about running Ren'Py that
|
||||
can be included into the README for your game. It may be necessary to
|
||||
change some of the filenames in this document, to make it specific to
|
||||
your game.
|
||||
|
||||
Feel free to use this in your projects.
|
||||
|
||||
|
||||
|
||||
Running the Game
|
||||
================
|
||||
|
||||
(Windows)
|
||||
|
||||
If this game was installed on Windows using an installer, then you can
|
||||
run it by choosing the shortcut left by the installer. If this game
|
||||
was installed on Windows using the cross-platform zip file, then it
|
||||
can be run by executing the run_game.exe file.
|
||||
|
||||
(Macintosh)
|
||||
|
||||
For information about running Ren'Py games on Mac OS 10.3 or higher,
|
||||
please go to http://www.bishoujo.us/renpy/mac.html .
|
||||
|
||||
(Linux/Unix)
|
||||
|
||||
For information about running Ren'Py games under Linux and Unix,
|
||||
please go to http://www.bishoujo.us/renpy/linux.html . At the very
|
||||
least, you will need to compile the _renpy module. Read
|
||||
the file module/README.txt for details.
|
||||
|
||||
|
||||
Playing the Game
|
||||
================
|
||||
|
||||
By default, the game starts running in full screen mode. On some
|
||||
computers, especially some virtual machines, this can lead to mouse
|
||||
problems. To fix this, press 'f'.
|
||||
|
||||
Some of the more interesting game actions can be performed as follows:
|
||||
|
||||
- The left mouse button is used to advance to the next line of
|
||||
dialogue, or to pick menu options.
|
||||
|
||||
- The right mouse button brings you into a menu screen where you can
|
||||
save the game, load the game, change preferences, return to the main
|
||||
menu, or quit entirely.
|
||||
|
||||
- Scrolling the mouse wheel up or pushing page up returns you to the
|
||||
previous screen.
|
||||
|
||||
- Holding down the CTRL key skips dialogue. By default, it only
|
||||
skips read dialogue, but this can be changed by a preference. Tab
|
||||
toggles skip mode.
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
A version of dissolve that only draws the pixels that are being
|
||||
dissolved, while doing a straight-blit on pixels that remain the same
|
||||
between the two images.
|
||||
|
||||
Figure out some way of having variables updated in a new context saved
|
||||
permanently, even if we return to the outer context because of a
|
||||
rollback or something. Need to be very careful here.
|
||||
|
||||
Dynamic variables, parameterized labels, etc.
|
||||
|
||||
Implement an extension mechanism of some sort, so that users can drop
|
||||
packages of Ren'Py code into the Ren'Py directory, and get stuff like
|
||||
speech support.
|
||||
|
||||
Implement speech control support.
|
||||
|
||||
BPP conversion (perhaps as a package).
|
||||
|
||||
Automatically scale to a fixed size.
|
||||
|
||||
Hide picture-mouse when leaving window, restore it when entering window.
|
||||
@@ -5,9 +5,11 @@ if [ "x$1" = "x" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
rsync -av updates tom@onegeek.org:/home/tom/WWW.update/renpy/
|
||||
|
||||
mkdir ~/ab/website/renpy/dl/$1
|
||||
cp dists/renpy-$1-* ~/ab/website/renpy/dl/$1
|
||||
cp CHANGELOG.txt ~/ab/website/renpy/dl/$1
|
||||
cp renpy-ppc.zip ~/ab/website/renpy/dl/$1
|
||||
|
||||
cd ~/ab/website
|
||||
./upload.sh
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
ln -s ../help.html tutorial/README.html
|
||||
ln -s ../help.html the_question/README.html
|
||||
ln -s ../help.html template/README.html
|
||||
|
||||
ln -s sphinx/source/license.rst LICENSE.txt
|
||||
@@ -1 +0,0 @@
|
||||
build_exe.py run_game
|
||||
@@ -1,28 +1,48 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import modulefinder
|
||||
import shutil
|
||||
from distutils.core import setup
|
||||
import py2exe
|
||||
import py2exe #@UnresolvedImport @UnusedImport
|
||||
import sys
|
||||
import zipfile
|
||||
import traceback
|
||||
import os
|
||||
|
||||
# The pythonpath on my system.
|
||||
sys.path.insert(0, 'c:\\msys\\1.0\\newbuild25\\install\\bin')
|
||||
sys.path.insert(0, 'c:\\msys\\1.0\\newbuild25\\install\\python')
|
||||
sys.path.insert(0, 'c:\\msys\\1.0\\newbuild\\install\\bin')
|
||||
sys.path.insert(0, 'c:\\msys\\1.0\\newbuild\\install\\python')
|
||||
|
||||
def move_from_dist(fn):
|
||||
"""
|
||||
Moves the file `fn` from the dist directory to the main
|
||||
directory. (This means we don't need symlinks on windows.)
|
||||
"""
|
||||
|
||||
if os.path.isdir(fn):
|
||||
shutil.rmtree(fn)
|
||||
elif os.path.exists(fn):
|
||||
os.unlink(fn)
|
||||
|
||||
os.rename("dist/" + fn, fn)
|
||||
|
||||
import renpy
|
||||
renpy.setup_modulefinder(modulefinder) #@UndefinedVariable
|
||||
|
||||
def main():
|
||||
|
||||
sys.argv[1:] = [ 'py2exe', '--bundle', '2', '-a', '--dll-excludes', 'w9xpopen.exe', ]
|
||||
# sys.argv[1:] = [ 'py2exe', '-a', '--dll-excludes', 'w9xpopen.exe', ]
|
||||
sys.argv[1:] = [ 'py2exe', '-a', '--dll-excludes', 'w9xpopen.exe', ]
|
||||
|
||||
setup(name="RenPy",
|
||||
setup(name="Ren'Py",
|
||||
windows=[ dict(script="renpy.py",
|
||||
dest_base="renpy",
|
||||
icon_resources=[ (1, "newicon.ico") ] ) ],
|
||||
icon_resources=[ (1, "newicon.ico") ],
|
||||
),
|
||||
],
|
||||
|
||||
console=[ dict(script="renpy.py", dest_base="console") ],
|
||||
|
||||
zipfile='renpy.code',
|
||||
zipfile='lib/windows-x86/renpy.code',
|
||||
|
||||
options={ 'py2exe' : { 'excludes' : [ 'doctest',
|
||||
'pygame.macosx',
|
||||
@@ -38,25 +58,31 @@ def main():
|
||||
'gettext',
|
||||
'os2emxpath',
|
||||
'macpath',
|
||||
'posixpath',
|
||||
],
|
||||
'optimize' : 2,
|
||||
} },
|
||||
)
|
||||
|
||||
|
||||
zfold = zipfile.ZipFile("dist/renpy.code")
|
||||
zfnew = zipfile.ZipFile("renpy.code", "w", zipfile.ZIP_STORED)
|
||||
zfold = zipfile.ZipFile("dist/lib/windows-x86/renpy.code")
|
||||
zfnew = zipfile.ZipFile("dist/lib/windows-x86/renpy.code.new", "w", zipfile.ZIP_STORED)
|
||||
|
||||
seen = { }
|
||||
|
||||
for fn in zfold.namelist():
|
||||
if fn.startswith("renpy/"):
|
||||
continue
|
||||
|
||||
# Keep around .pyo files that load pyd files.
|
||||
pydfn = fn.replace("/", ".").replace(".pyo", ".pyd")
|
||||
if not os.path.exists("dist/lib/windows-x86/" + pydfn):
|
||||
continue
|
||||
|
||||
if fn in seen:
|
||||
continue
|
||||
|
||||
if fn == "SDL_mixer.dll":
|
||||
continue
|
||||
|
||||
seen[fn] = True
|
||||
|
||||
zfnew.writestr(fn, zfold.read(fn))
|
||||
@@ -64,11 +90,21 @@ def main():
|
||||
zfold.close()
|
||||
zfnew.close()
|
||||
|
||||
os.unlink("dist/lib/windows-x86/renpy.code")
|
||||
os.rename("dist/lib/windows-x86/renpy.code.new", "dist/lib/windows-x86/renpy.code")
|
||||
|
||||
shutil.copy("c:/Python26/Microsoft.VC90.CRT.manifest", "Microsoft.VC90.CRT.manifest")
|
||||
shutil.copy("c:/Python26/msvcr90.dll", "msvcr90.dll")
|
||||
|
||||
move_from_dist("lib/windows-x86")
|
||||
move_from_dist("console.exe")
|
||||
move_from_dist("python26.dll")
|
||||
move_from_dist("renpy.exe")
|
||||
|
||||
|
||||
try:
|
||||
main()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
print
|
||||
print "Press return to quit."
|
||||
raw_input()
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import collections
|
||||
import glob
|
||||
import re
|
||||
import os
|
||||
|
||||
# A map from string to filename, line number where the string is found.
|
||||
strings = collections.defaultdict(list)
|
||||
|
||||
def process(fn):
|
||||
|
||||
lineno = 0
|
||||
|
||||
for data in file(fn, "r"):
|
||||
|
||||
lineno += 1
|
||||
|
||||
matches = [ ]
|
||||
|
||||
matches += re.finditer(r'\bu\"(\\"|[^"])+\"', data)
|
||||
matches += re.finditer(r"\bu\'(\\'|[^'])+\'", data)
|
||||
|
||||
for m in matches:
|
||||
s = m.group(0)[2:-1]
|
||||
|
||||
if "\\u" in s:
|
||||
continue
|
||||
|
||||
if len(s) == 1:
|
||||
continue
|
||||
|
||||
strings[s].append("%s:%d" % (fn, lineno))
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
files = [ ]
|
||||
|
||||
files += glob.glob("launcher/*.rpy")
|
||||
files += glob.glob("common/*.rpy")
|
||||
files += glob.glob("common/*.rpym")
|
||||
files += glob.glob("common/_layout/*.rpym")
|
||||
files += glob.glob("common/_compat/*.rpym")
|
||||
|
||||
if "launcher/strings.rpy" in files:
|
||||
files.remove("launcher/strings.rpy")
|
||||
|
||||
for fn in files:
|
||||
process(fn)
|
||||
|
||||
converse = [ ]
|
||||
|
||||
for k, v in strings.iteritems():
|
||||
v = " ".join(sorted(v))
|
||||
converse.append((v, k))
|
||||
|
||||
converse.sort()
|
||||
|
||||
f = file("launcher/strings.rpy", "w")
|
||||
|
||||
files = set(i for i in os.listdir("launcher") if i.endswith(".rpy"))
|
||||
|
||||
print >>f, """\
|
||||
init python:
|
||||
LAUNCHER_RPYS = %r
|
||||
|
||||
TRANSLATION_STRINGS = [
|
||||
""" % files
|
||||
|
||||
for v, k in converse:
|
||||
# print
|
||||
# print "#:", v
|
||||
# print "#, python-format"
|
||||
|
||||
print >>f, " u\"%s\"," % unicode(k)
|
||||
|
||||
print >>f, """\
|
||||
]
|
||||
"""
|
||||
@@ -1,62 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import glob
|
||||
import os
|
||||
|
||||
files = glob.glob("common/*.rpy")
|
||||
files.sort()
|
||||
|
||||
styles = [ ]
|
||||
|
||||
for fn in files:
|
||||
f = file(fn)
|
||||
|
||||
fi = iter(f)
|
||||
|
||||
for l in iter(fi):
|
||||
|
||||
l = l.strip()
|
||||
|
||||
if l.startswith("### "):
|
||||
|
||||
prefix, style, parent = l.split()
|
||||
|
||||
desc = ""
|
||||
|
||||
for l in fi:
|
||||
|
||||
l = l.strip()
|
||||
if not l.startswith("# "):
|
||||
break
|
||||
|
||||
desc = desc + " " + l[2:]
|
||||
|
||||
styles.append(' style.create("%s", "%s", "%s")' % (style, parent, desc[1:]))
|
||||
|
||||
f.close()
|
||||
|
||||
f = file("common/style.rpy")
|
||||
of = file("common/style.rpy.new", "w")
|
||||
|
||||
fi = iter(f)
|
||||
|
||||
for l in fi:
|
||||
|
||||
of.write(l)
|
||||
|
||||
if l.startswith("# AUTOMATICALLY GENERATED"):
|
||||
|
||||
for l in styles:
|
||||
of.write(l + "\n")
|
||||
|
||||
for l in fi:
|
||||
if l.startswith("# END AUTOMATICALLY GENERATED"):
|
||||
break
|
||||
|
||||
of.write(l)
|
||||
|
||||
f.close()
|
||||
of.close()
|
||||
|
||||
os.rename("common/style.rpy", "common/style.rpy.bak")
|
||||
os.rename("common/style.rpy.new", "common/style.rpy")
|
||||
@@ -1,48 +0,0 @@
|
||||
1#!/usr/bin/env python
|
||||
|
||||
import glob
|
||||
import re
|
||||
from sets import Set as set
|
||||
import sys
|
||||
|
||||
seen_files = set()
|
||||
seen_strings = set()
|
||||
|
||||
def tl(fn, s):
|
||||
|
||||
s = eval(s)
|
||||
|
||||
if s in seen_strings:
|
||||
return
|
||||
|
||||
if fn not in seen_files:
|
||||
print >>out
|
||||
print >>out, " # Translatable strings found in", fn
|
||||
print >>out
|
||||
seen_files.add(fn)
|
||||
|
||||
print >>out, " config.translations[%r] = %r" % (s, s)
|
||||
seen_strings.add(s)
|
||||
|
||||
def process(fn):
|
||||
|
||||
data = file(fn).read()
|
||||
|
||||
for m in re.finditer(r'\bu\"(\\"|[^"])+\"', data):
|
||||
tl(fn, m.group(0))
|
||||
|
||||
for m in re.finditer(r"\bu\'(\\'|[^'])+\'", data):
|
||||
tl(fn, m.group(0))
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
# out = file("extras/translations.rpy", "w")
|
||||
out = sys.stdout
|
||||
|
||||
print >>out, "# This file contains a list of all of the phrases you can translate"
|
||||
print >>out, "# from the Ren'Py common code."
|
||||
print >>out, ""
|
||||
print >>out, "init python:"
|
||||
|
||||
for fn in glob.glob("common/*.rpy") + glob.glob("common/_layout/*.rpym") + glob.glob("common/_compat/*.rpym"):
|
||||
process(fn)
|
||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 335 B |
@@ -1,697 +0,0 @@
|
||||
# cardgame.rpy - Cardgame support for Ren'Py
|
||||
# Copyright (C) 2008 PyTom <pytom@bishoujo.us>
|
||||
#
|
||||
# This software may be distributed in modified or unmodified form,
|
||||
# provided:
|
||||
#
|
||||
# (1) This complete license notice is retained.
|
||||
#
|
||||
# (2) This software and all software and data files distributed
|
||||
# alongside this software and intended to be loaded in the same
|
||||
# memory space may be redistributed without requirement for
|
||||
# payment, notification, or other forms of compensation.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Commercial licensing for this software is available, please
|
||||
# contact pytom@bishoujo.us for information.
|
||||
|
||||
init python:
|
||||
|
||||
import pygame
|
||||
|
||||
DRAG_NONE = 0
|
||||
DRAG_CARD = 1
|
||||
DRAG_ABOVE = 2
|
||||
DRAG_STACK = 3
|
||||
DRAG_TOP = 4
|
||||
|
||||
# Returns the overlap of the area between the two
|
||||
# rectangles.
|
||||
def __rect_overlap_area(r1, r2):
|
||||
if r1 is None or r2 is None:
|
||||
return 0
|
||||
|
||||
x1, y1, w1, h1 = r1
|
||||
x2, y2, w2, h2 = r2
|
||||
|
||||
maxleft = max(x1, x2)
|
||||
minright = min(x1 + w1, x2 + w2)
|
||||
maxtop = max(y1, y2)
|
||||
minbottom = min(y1 + h1, y2 + h2)
|
||||
|
||||
if minright < maxleft:
|
||||
return 0
|
||||
|
||||
if minbottom < maxtop:
|
||||
return 0
|
||||
|
||||
return (minright - maxleft) * (minbottom - maxtop)
|
||||
|
||||
def __default_can_drag(table, stack, card):
|
||||
return table.get_faceup(card)
|
||||
|
||||
class Table(renpy.Displayable):
|
||||
|
||||
def __init__(self, back=None, base=None, springback=0.1, rotate=0.1, can_drag=__default_can_drag, doubleclick=.33, **kwargs):
|
||||
|
||||
renpy.Displayable.__init__(self, **kwargs)
|
||||
|
||||
# A map from card value to the card object corresponding to
|
||||
# that value.
|
||||
self.cards = { }
|
||||
|
||||
# A list of the stacks that have been defined.
|
||||
self.stacks = [ ]
|
||||
|
||||
# The back of cards that don't have a more specific back
|
||||
# defined.
|
||||
self.back = renpy.easy.displayable_or_none(back)
|
||||
|
||||
# The base of stacks that don't have a more specific base
|
||||
# defined.
|
||||
self.base = renpy.easy.displayable_or_none(base)
|
||||
|
||||
# The amount of time it takes for cards to springback
|
||||
# into their rightful place.
|
||||
self.springback = springback
|
||||
|
||||
# The amount of time it takes for cards to rotate into
|
||||
# their proper orientation.
|
||||
self.rotate = rotate
|
||||
|
||||
# A function that is called to tell if we can drag a
|
||||
# particular card.
|
||||
self.can_drag = can_drag
|
||||
|
||||
# The time between clicks for the click to be considered a
|
||||
# double-click.
|
||||
self.doubleclick = doubleclick
|
||||
|
||||
# Are we sensitive to input? [doc]
|
||||
self.sensitive = True
|
||||
|
||||
# The last click event.
|
||||
self.last_event = CardEvent()
|
||||
|
||||
# The card that has been clicked.
|
||||
self.click_card = None
|
||||
|
||||
# The stack that has been clicked.
|
||||
self.click_stack = None
|
||||
|
||||
# The list of cards that are being dragged.
|
||||
self.drag_cards = [ ]
|
||||
|
||||
# Are we dragging the cards?
|
||||
self.dragging = False
|
||||
|
||||
# The position where we clicked.
|
||||
self.click_x = 0
|
||||
self.click_y = 0
|
||||
|
||||
# The amount of time we've been shown for.
|
||||
self.st = 0
|
||||
|
||||
# This shows the table on the given layer.
|
||||
def show(self, layer='master'):
|
||||
|
||||
for v in self.cards.itervalues():
|
||||
v.offset = __Fixed(0, 0)
|
||||
|
||||
ui.layer(layer)
|
||||
ui.add(self)
|
||||
ui.close()
|
||||
|
||||
# This hides the table.
|
||||
def hide(self, layer='master'):
|
||||
ui.layer(layer)
|
||||
ui.remove(self)
|
||||
ui.close()
|
||||
|
||||
# This controls sensitivity.
|
||||
def set_sensitive(self, value):
|
||||
self.sensitive = value
|
||||
|
||||
def get_card(self, value):
|
||||
if value not in self.cards:
|
||||
raise Exception("No card has the value %r." % value)
|
||||
|
||||
return self.cards[value]
|
||||
|
||||
# This sets the faceup status of a card.
|
||||
def set_faceup(self, card, faceup=True):
|
||||
self.get_card(card).faceup = faceup
|
||||
renpy.redraw(self, 0)
|
||||
|
||||
def get_faceup(self, card):
|
||||
return self.get_card(card).faceup
|
||||
|
||||
# This sets the rotation of a card.
|
||||
def set_rotate(self, card, rotation):
|
||||
__Rotate(self.get_card(card), rotation)
|
||||
renpy.redraw(self, 0)
|
||||
|
||||
def get_rotate(self, card):
|
||||
return self.get_card(card).rotate.rotate_limit()
|
||||
|
||||
def add_marker(self, card, marker):
|
||||
self.get_card(card).markers.append(marker)
|
||||
renpy.redraw(self, 0)
|
||||
|
||||
def remove_marker(self, card, marker):
|
||||
self.get_card(card).markers.remove(marker)
|
||||
renpy.redraw(self, 0)
|
||||
|
||||
# Called to create a new card.
|
||||
def card(self, value, face, back=None):
|
||||
self.cards[value] = __Card(self, value, face, back)
|
||||
|
||||
# Called to create a new stack.
|
||||
def stack(self, x, y, xoff=0, yoff=0, show=1024, base=None,
|
||||
click=False, drag=DRAG_NONE, drop=False, hidden=False):
|
||||
|
||||
rv = __Stack(self, x, y, xoff, yoff, show, base, click, drag, drop, hidden)
|
||||
|
||||
self.stacks.append(rv)
|
||||
return rv
|
||||
|
||||
# Force a redraw on each interaction.
|
||||
def per_interact(self):
|
||||
renpy.redraw(self, 0)
|
||||
|
||||
|
||||
def render(self, width, height, st, at):
|
||||
|
||||
self.st = st
|
||||
|
||||
rv = renpy.Render(width, height)
|
||||
|
||||
for s in self.stacks:
|
||||
|
||||
if s.hidden:
|
||||
s.rect = None
|
||||
for c in s.cards:
|
||||
c.rect = None
|
||||
continue
|
||||
|
||||
s.render_to(rv, width, height, st, at)
|
||||
|
||||
for c in s.cards:
|
||||
c.render_to(rv, width, height, st, at)
|
||||
|
||||
return rv
|
||||
|
||||
def event(self, ev, x, y, st):
|
||||
|
||||
self.st = st
|
||||
|
||||
if not self.sensitive:
|
||||
return
|
||||
|
||||
grabbed = renpy.display.focus.get_grab()
|
||||
|
||||
if (grabbed is not None) and (grabbed is not self):
|
||||
return
|
||||
|
||||
if ev.type == pygame.MOUSEBUTTONDOWN and ev.button == 1:
|
||||
|
||||
if self.click_stack:
|
||||
return
|
||||
|
||||
stack = None
|
||||
card = None
|
||||
|
||||
for s in self.stacks:
|
||||
|
||||
sx, sy, sw, sh = s.rect
|
||||
if sx <= x and sy <= y and sx + sw > x and sy + sh > y:
|
||||
stack = s
|
||||
|
||||
|
||||
for c in s.cards[-s.show:]:
|
||||
if c.rect is None:
|
||||
continue
|
||||
|
||||
cx, cy, cw, ch = c.rect
|
||||
if cx <= x and cy <= y and cx + cw > x and cy + ch > y:
|
||||
card = c
|
||||
stack = c.stack
|
||||
|
||||
if stack is None:
|
||||
return
|
||||
|
||||
# Grab the display.
|
||||
renpy.display.focus.set_grab(self)
|
||||
|
||||
# Don't let the user grab a moving card.
|
||||
if card is not None:
|
||||
xoffset, yoffset = card.offset.offset()
|
||||
if xoffset or yoffset:
|
||||
return
|
||||
|
||||
# Move the stack containing the card to the front.
|
||||
self.stacks.remove(stack)
|
||||
self.stacks.append(stack)
|
||||
|
||||
if stack.click or stack.drag:
|
||||
self.click_card = card
|
||||
self.click_stack = stack
|
||||
|
||||
if card is None or not self.can_drag(self, card.stack, card.value):
|
||||
self.drag_cards = [ ]
|
||||
elif card.stack.drag == DRAG_CARD:
|
||||
self.drag_cards = [ card ]
|
||||
elif card.stack.drag == DRAG_ABOVE:
|
||||
self.drag_cards = [ ]
|
||||
for c in card.stack.cards:
|
||||
if c is card or self.drag_cards:
|
||||
self.drag_cards.append(c)
|
||||
elif card.stack.drag == DRAG_STACK:
|
||||
self.drag_cards = list(card.stack.cards)
|
||||
elif card.stack.drag == DRAG_TOP:
|
||||
if card.stack.cards[-1] is card:
|
||||
self.drag_cards = [ card ]
|
||||
else:
|
||||
self.drag_cards = [ ]
|
||||
|
||||
for c in self.drag_cards:
|
||||
c.offset = __Fixed(0, 0)
|
||||
|
||||
self.click_x = x
|
||||
self.click_y = y
|
||||
self.dragging = False
|
||||
|
||||
renpy.redraw(self, 0)
|
||||
|
||||
raise renpy.IgnoreEvent()
|
||||
|
||||
if ev.type == pygame.MOUSEMOTION or (ev.type == pygame.MOUSEBUTTONUP and ev.button == 1):
|
||||
|
||||
if abs(x - self.click_x) > 7 or abs(y - self.click_y) > 7:
|
||||
self.dragging = True
|
||||
|
||||
dx = x - self.click_x
|
||||
dy = y - self.click_y
|
||||
|
||||
for c in self.drag_cards:
|
||||
xoffset, yoffset = c.offset.offset()
|
||||
|
||||
cdx = dx - xoffset
|
||||
cdy = dy - yoffset
|
||||
|
||||
c.offset = __Fixed(dx, dy)
|
||||
|
||||
if c.rect:
|
||||
cx, cy, cw, ch = c.rect
|
||||
cx += cdx
|
||||
cy += cdy
|
||||
c.rect = (cx, cy, cw, ch)
|
||||
|
||||
area = 0
|
||||
dststack = None
|
||||
dstcard = None
|
||||
|
||||
for s in self.stacks:
|
||||
if not s.drop:
|
||||
continue
|
||||
|
||||
for c in self.drag_cards:
|
||||
|
||||
if c.stack == s:
|
||||
continue
|
||||
a = __rect_overlap_area(c.rect, s.rect)
|
||||
if a >= area:
|
||||
dststack = s
|
||||
dstcard = None
|
||||
area = a
|
||||
|
||||
for c1 in s.cards:
|
||||
a = __rect_overlap_area(c.rect, c1.rect)
|
||||
if a >= area:
|
||||
dststack = s
|
||||
dstcard = c1
|
||||
area = a
|
||||
|
||||
if area == 0:
|
||||
dststack = None
|
||||
dstcard = None
|
||||
|
||||
renpy.redraw(self, 0)
|
||||
|
||||
if ev.type == pygame.MOUSEMOTION:
|
||||
raise renpy.IgnoreEvent()
|
||||
|
||||
if ev.type == pygame.MOUSEBUTTONUP and ev.button == 1:
|
||||
|
||||
# Ungrab the display.
|
||||
renpy.display.focus.set_grab(None)
|
||||
|
||||
evt = None
|
||||
|
||||
if self.dragging:
|
||||
if dststack is not None and self.drag_cards:
|
||||
|
||||
evt = CardEvent()
|
||||
evt.type = "drag"
|
||||
evt.table = self
|
||||
evt.stack = self.click_stack
|
||||
evt.card = self.click_card.value
|
||||
evt.drag_cards = [c.value for c in self.drag_cards]
|
||||
evt.drop_stack = dststack
|
||||
if dstcard:
|
||||
evt.drop_card = dstcard.value
|
||||
evt.time = st
|
||||
|
||||
else:
|
||||
|
||||
if self.click_stack.click:
|
||||
|
||||
evt = CardEvent()
|
||||
evt.type = "click"
|
||||
evt.table = self
|
||||
evt.stack = self.click_stack
|
||||
if self.click_card:
|
||||
evt.card = self.click_card.value
|
||||
else:
|
||||
evt.card = None
|
||||
|
||||
evt.time = st
|
||||
|
||||
if (evt.type == self.last_event.type
|
||||
and evt.stack == self.last_event.stack
|
||||
and evt.card == self.last_event.card
|
||||
and evt.time < self.last_event.time + self.doubleclick):
|
||||
|
||||
evt.type = "doubleclick"
|
||||
|
||||
if evt is not None:
|
||||
self.last_event = evt
|
||||
|
||||
for c in self.drag_cards:
|
||||
c.springback()
|
||||
|
||||
self.click_card = None
|
||||
self.click_stack = None
|
||||
self.drag_cards = [ ]
|
||||
|
||||
if evt is not None:
|
||||
return evt
|
||||
else:
|
||||
raise renpy.IgnoreEvent()
|
||||
|
||||
|
||||
class CardEvent(object):
|
||||
|
||||
def __init__(self):
|
||||
self.type = None
|
||||
self.stack = None
|
||||
self.card = None
|
||||
self.drag_cards = None
|
||||
self.drop_stack = None
|
||||
self.drop_card = None
|
||||
self.time = 0
|
||||
|
||||
# Represents a stack of one or more cards, which can be placed on the
|
||||
# table.
|
||||
class __Stack(object):
|
||||
|
||||
def __init__(
|
||||
self, table,
|
||||
x, y,
|
||||
xoff, yoff,
|
||||
show, base,
|
||||
click, drag, drop,
|
||||
hidden):
|
||||
|
||||
|
||||
# The table this stack belongs to.
|
||||
self.table = table
|
||||
|
||||
# The x and y coordinates of the center of the top card of
|
||||
# this stack.
|
||||
self.x = x
|
||||
self.y = y
|
||||
|
||||
# The offset in the x and y directions of each successive
|
||||
# card.
|
||||
self.xoff = xoff
|
||||
self.yoff = yoff
|
||||
|
||||
# The number of cards to show from this stack. (We show the
|
||||
# last show cards if this is less than the numebr of cards
|
||||
# in the stack.)
|
||||
self.show = show
|
||||
|
||||
# The image that is shown behind the stack. If None, the
|
||||
# background is taken from the table.
|
||||
self.base = base
|
||||
|
||||
# Should we report click events on this stack?
|
||||
self.click = click
|
||||
|
||||
# Should we allow dragging this stack? If so, how?
|
||||
self.drag = drag
|
||||
|
||||
# Should we allow dropping to this stack?
|
||||
self.drop = drop
|
||||
|
||||
# Is this stack hidden?
|
||||
self.hidden = hidden
|
||||
|
||||
# The list of cards in this stack.
|
||||
self.cards = [ ]
|
||||
|
||||
# The rectangle for the background of this effect.
|
||||
self.rect = None
|
||||
|
||||
def insert(self, index, card):
|
||||
card = self.table.get_card(card)
|
||||
|
||||
if card.stack:
|
||||
card.stack.cards.remove(card)
|
||||
|
||||
card.stack = self
|
||||
self.cards.insert(index, card)
|
||||
|
||||
self.table.stacks.remove(self)
|
||||
self.table.stacks.append(self)
|
||||
|
||||
card.springback()
|
||||
|
||||
def append(self, card):
|
||||
if card in self.cards:
|
||||
self.insert(len(self.cards) - 1, card)
|
||||
else:
|
||||
self.insert(len(self.cards), card)
|
||||
|
||||
def remove(self, card):
|
||||
card = self.table.get_card(card)
|
||||
self.cards.remove(card)
|
||||
card.stack = None
|
||||
card.rect = None
|
||||
|
||||
def deal(self):
|
||||
if not self.cards:
|
||||
return None
|
||||
|
||||
card = self.cards[-1]
|
||||
self.remove(card.value)
|
||||
return card.value
|
||||
|
||||
def shuffle(self):
|
||||
renpy.random.shuffle(self.cards)
|
||||
renpy.redraw(self.table, 0)
|
||||
|
||||
def __len__(self):
|
||||
return len(self.cards)
|
||||
|
||||
def __getitem__(self, idx):
|
||||
return self.cards[idx].value
|
||||
|
||||
def __iter__(self):
|
||||
for i in self.cards:
|
||||
yield i.value
|
||||
|
||||
def __contains__(self, item):
|
||||
return self.table.get_card(card) in self.cards
|
||||
|
||||
def render_to(self, rv, width, height, st, at):
|
||||
|
||||
base = self.base or self.table.base
|
||||
|
||||
if base is None:
|
||||
return
|
||||
|
||||
surf = renpy.render(base, width, height, st, at)
|
||||
cw, ch = surf.get_size()
|
||||
|
||||
cx = self.x - cw / 2
|
||||
cy = self.y - ch / 2
|
||||
|
||||
self.rect = (cx, cy, cw, ch)
|
||||
rv.blit(surf, (cx, cy))
|
||||
|
||||
class __Card(object):
|
||||
|
||||
def __init__(self, table, value, face, back):
|
||||
|
||||
# The table this card belongs to.
|
||||
self.table = table
|
||||
|
||||
# The value of this card.
|
||||
self.value = value
|
||||
|
||||
# The face of this card.
|
||||
self.face = renpy.easy.displayable(face)
|
||||
|
||||
# The back of this card. If None, then the back is taken from
|
||||
# the table the card belongs to.
|
||||
self.back = renpy.easy.displayable_or_none(back)
|
||||
|
||||
# Is this card faceup (or face down?)
|
||||
self.faceup = True
|
||||
|
||||
# Object that's called to decide how rotated this card should
|
||||
# be.
|
||||
self.rotate = None
|
||||
|
||||
# A series of highlights that should be drawn over this card.
|
||||
self.highlights = [ ]
|
||||
|
||||
# The stack this card is in.
|
||||
self.stack = None
|
||||
|
||||
# An object that gives the offset of this card relative to
|
||||
# where it would normally be placed.
|
||||
self.offset = __Fixed(0, 0)
|
||||
|
||||
# The rectangle where this card was last drawn to the screen
|
||||
# at.
|
||||
self.rect = None
|
||||
|
||||
__Rotate(self, 0)
|
||||
|
||||
# Returns the base x and y placement of this card.
|
||||
def place(self):
|
||||
s = self.stack
|
||||
offset = max(len(s.cards) - s.show, 0)
|
||||
index = max(s.cards.index(self) - offset, 0)
|
||||
|
||||
return (s.x + s.xoff * index, s.y + s.yoff * index)
|
||||
|
||||
def springback(self):
|
||||
if self.rect is None:
|
||||
self.offset = __Fixed(0, 0)
|
||||
else:
|
||||
self.offset = __Springback(self)
|
||||
|
||||
def render_to(self, rv, width, height, st, at):
|
||||
|
||||
x, y = self.place()
|
||||
xoffset, yoffset = self.offset.offset()
|
||||
x += xoffset
|
||||
y += yoffset
|
||||
|
||||
if self.faceup:
|
||||
d = self.face
|
||||
else:
|
||||
d = self.back or self.table.back
|
||||
|
||||
# TODO: Figure out if we can reuse some of this.
|
||||
|
||||
if self.highlights:
|
||||
d = Fixed(* ([d] + [renpy.easy.displayable(i) for i in self.highlights]))
|
||||
|
||||
r = self.rotate.rotate()
|
||||
if r:
|
||||
d = RotoZoom(r, r, 0, 1, 1, 0)(d)
|
||||
|
||||
surf = renpy.render(d, width, height, st, at)
|
||||
w, h = surf.get_size()
|
||||
|
||||
x -= w / 2
|
||||
y -= h / 2
|
||||
|
||||
self.rect = (x, y, w, h)
|
||||
|
||||
rv.blit(surf, (x, y))
|
||||
|
||||
def __repr__(self):
|
||||
return "<__Card %r>" % self.value
|
||||
|
||||
|
||||
class __Springback(object):
|
||||
|
||||
def __init__(self, card):
|
||||
self.card = card
|
||||
self.table = table = card.table
|
||||
|
||||
self.start = table.st
|
||||
|
||||
cx, cy, cw, ch = self.card.rect
|
||||
x = cx + cw / 2
|
||||
y = cy + ch / 2
|
||||
|
||||
self.startx = x
|
||||
self.starty = y
|
||||
|
||||
def offset(self):
|
||||
|
||||
t = (self.table.st - self.start) / self.table.springback
|
||||
t = min(t, 1.0)
|
||||
|
||||
if t < 1.0:
|
||||
renpy.redraw(self.table, 0)
|
||||
|
||||
px, py = self.card.place()
|
||||
|
||||
return int((self.startx - px) * (1.0 - t)), int((self.starty - py) * (1.0 - t))
|
||||
|
||||
|
||||
class __Fixed(object):
|
||||
def __init__(self, x, y):
|
||||
self.x = x
|
||||
self.y = y
|
||||
|
||||
def offset(self):
|
||||
return self.x, self.y
|
||||
|
||||
|
||||
class __Rotate(object):
|
||||
def __init__(self, card, amount):
|
||||
|
||||
self.table = table = card.table
|
||||
self.start = table.st
|
||||
|
||||
if card.rotate is None:
|
||||
self.start_rotate = amount
|
||||
else:
|
||||
self.start_rotate = card.rotate.rotate()
|
||||
|
||||
self.end_rotate = amount
|
||||
|
||||
card.rotate = self
|
||||
|
||||
|
||||
def rotate(self):
|
||||
|
||||
if self.start_rotate == self.end_rotate:
|
||||
return self.start_rotate
|
||||
|
||||
t = (self.table.st - self.start) / self.table.springback
|
||||
t = min(t, 1.0)
|
||||
|
||||
if t < 1.0:
|
||||
renpy.redraw(self.table, 0)
|
||||
|
||||
return self.start_rotate + (self.end_rotate - self.start_rotate) * t
|
||||
|
||||
def rotate_limit(self):
|
||||
return self.end_rotate
|
||||
|
Before Width: | Height: | Size: 140 KiB |
@@ -1,336 +0,0 @@
|
||||
# klondike.rpy - Klondike Solitaire
|
||||
# Copyright (C) 2008 PyTom <pytom@bishoujo.us>
|
||||
#
|
||||
# This software may be distributed in modified or unmodified form,
|
||||
# provided:
|
||||
#
|
||||
# (1) This complete license notice is retained.
|
||||
#
|
||||
# (2) This software and all software and data files distributed
|
||||
# alongside this software and intended to be loaded in the same
|
||||
# memory space may be redistributed without requirement for
|
||||
# payment, notification, or other forms of compensation.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Commercial licensing for this software is available, please
|
||||
# contact pytom@bishoujo.us for information.
|
||||
|
||||
init python:
|
||||
|
||||
class Klondike(object):
|
||||
|
||||
# We represent a card as a (suit, rank) tuple. The suit is one of the
|
||||
# following four constants, while the rank is 1 for ace, 2 for 2,
|
||||
# ..., 10 for 10, 11 for jack, 12 for queen, 13 for king.
|
||||
CLUB = 0
|
||||
SPADE = 1
|
||||
HEART = 2
|
||||
DIAMOND = 3
|
||||
|
||||
def __init__(self, deal=3):
|
||||
|
||||
# Constants that let us easily change where the game is
|
||||
# located.
|
||||
LEFT=140
|
||||
TOP=58
|
||||
COL_SPACING = 90
|
||||
ROW_SPACING = 120
|
||||
CARD_XSPACING = 20
|
||||
CARD_YSPACING = 30
|
||||
|
||||
# Store the parameters.
|
||||
self.deal = deal
|
||||
|
||||
# Create the table, stock, and waste.
|
||||
self.table = t = Table(base="card/base.png", back="card/back.png")
|
||||
self.stock = t.stack(LEFT, TOP, xoff=0, yoff=0, click=True)
|
||||
self.waste = t.stack(LEFT + COL_SPACING, TOP, xoff=CARD_XSPACING, drag=DRAG_TOP, show=self.deal, click=True)
|
||||
|
||||
# The 4 foundation stacks.
|
||||
self.foundations = [ ]
|
||||
for i in range(0, 4):
|
||||
s = t.stack(LEFT + COL_SPACING * (i + 3), TOP, xoff=0, yoff=0, drag=DRAG_TOP, drop=True)
|
||||
self.foundations.append(s)
|
||||
|
||||
# The 7 tableau stacks.
|
||||
self.tableau = [ ]
|
||||
for i in range(0, 7):
|
||||
s = t.stack(LEFT + COL_SPACING * i, TOP + ROW_SPACING, xoff=0, yoff=CARD_YSPACING, drag=DRAG_ABOVE, click=True, drop=True)
|
||||
self.tableau.append(s)
|
||||
|
||||
# Create the stock and shuffle it.
|
||||
for rank in range(1, 14):
|
||||
for suit in range(0, 4):
|
||||
value = (suit, rank)
|
||||
t.card(value, "card/%d.png" % self.card_num(suit, rank))
|
||||
t.set_faceup(value, False)
|
||||
self.stock.append(value)
|
||||
|
||||
self.stock.shuffle()
|
||||
|
||||
# Deal out the initial tableau.
|
||||
for i in range(0, 7):
|
||||
for j in range(i, 7):
|
||||
c = self.stock.deal()
|
||||
self.tableau[j].append(c)
|
||||
|
||||
# Ensure that the bottom of each tableau is faceup.
|
||||
for i in range(0, 7):
|
||||
if self.tableau[i]:
|
||||
self.table.set_faceup(self.tableau[i][-1], True)
|
||||
|
||||
|
||||
# This figures out the image filename for a given suit and rank.
|
||||
def card_num(self, suit, rank):
|
||||
ranks = [ None, 1, 49, 45, 41, 37, 33, 29, 25, 21, 17, 13, 9, 5 ]
|
||||
return suit + ranks[rank]
|
||||
|
||||
def show(self):
|
||||
self.table.show()
|
||||
|
||||
def hide(self):
|
||||
self.table.hide()
|
||||
|
||||
def tableau_drag(self, evt):
|
||||
|
||||
card = evt.drag_cards[0]
|
||||
cards = evt.drag_cards
|
||||
stack = evt.drop_stack
|
||||
|
||||
csuit, crank = card
|
||||
|
||||
# If the stack is empty, allow a king to be dragged to it.
|
||||
if not stack:
|
||||
if crank == 13:
|
||||
for i in cards:
|
||||
stack.append(i)
|
||||
|
||||
return "tableau_drag"
|
||||
|
||||
# Otherwise, the stack has a bottom card.
|
||||
bottom = stack[-1]
|
||||
bsuit, brank = bottom
|
||||
|
||||
# Figure out which of the stacks are black.
|
||||
cblack = (csuit == self.SPADE) or (csuit == self.CLUB)
|
||||
bblack = (bsuit == self.SPADE) or (bsuit == self.CLUB)
|
||||
|
||||
# Can we legally place the cards?
|
||||
if (bblack != cblack) and (crank == brank - 1):
|
||||
|
||||
# Place the cards:
|
||||
for i in cards:
|
||||
stack.append(i)
|
||||
|
||||
return "tableau_drag"
|
||||
|
||||
return False
|
||||
|
||||
def foundation_drag(self, evt):
|
||||
|
||||
# We can only drag one card at a time to a foundation.
|
||||
if len(evt.drag_cards) != 1:
|
||||
return False
|
||||
|
||||
suit, rank = evt.drag_cards[0]
|
||||
|
||||
# If there is a card on the foundation already, then
|
||||
# check to see if we're dropping then next one in
|
||||
# sequence.
|
||||
if len(evt.drop_stack):
|
||||
dsuit, drank = evt.drop_stack[-1]
|
||||
if suit == dsuit and rank == drank + 1:
|
||||
evt.drop_stack.append(evt.drag_cards[0])
|
||||
return "foundation_drag"
|
||||
|
||||
# Otherwise, make sure we're dropping an ace.
|
||||
else:
|
||||
if rank == 1:
|
||||
evt.drop_stack.append(evt.drag_cards[0])
|
||||
return "foundation_drag"
|
||||
|
||||
return False
|
||||
|
||||
def tableau_doubleclick(self, evt):
|
||||
|
||||
# Make sure that there's at least one card in the stack.
|
||||
if not evt.stack:
|
||||
return False
|
||||
|
||||
# The bottom card in the stack.
|
||||
card = evt.stack[-1]
|
||||
suit, rank = card
|
||||
|
||||
# If the card is an ace, find an open foundation and put it
|
||||
# there.
|
||||
if rank == 1:
|
||||
for i in self.foundations:
|
||||
if not i:
|
||||
i.append(card)
|
||||
break
|
||||
return "foundation_drag"
|
||||
|
||||
# Otherwise, see if there's a foundation where we can put
|
||||
# the card.
|
||||
for i in self.foundations:
|
||||
if not i:
|
||||
continue
|
||||
|
||||
fsuit, frank = i[-1]
|
||||
if suit == fsuit and rank == frank + 1:
|
||||
i.append(card)
|
||||
return "foundation_drag"
|
||||
|
||||
return False
|
||||
|
||||
def stock_click(self, evt):
|
||||
|
||||
# If there are cards in the stock, dispense up to three3
|
||||
# of them.
|
||||
if self.stock:
|
||||
for i in range(0, self.deal):
|
||||
if self.stock:
|
||||
c = self.stock[-1]
|
||||
self.table.set_faceup(c, True)
|
||||
self.waste.append(c)
|
||||
|
||||
return "stock_click"
|
||||
|
||||
# Otherwise, move the contents of the waste to the stock.
|
||||
else:
|
||||
while self.waste:
|
||||
c = self.waste[-1]
|
||||
self.table.set_faceup(c, False)
|
||||
self.stock.append(c)
|
||||
|
||||
return "stock_click"
|
||||
|
||||
|
||||
def interact(self):
|
||||
|
||||
evt = ui.interact()
|
||||
rv = False
|
||||
|
||||
# Check the various events, and dispatch them to the methods
|
||||
# that handle them.
|
||||
if evt.type == "drag":
|
||||
if evt.drop_stack in self.tableau:
|
||||
rv = self.tableau_drag(evt)
|
||||
|
||||
elif evt.drop_stack in self.foundations:
|
||||
rv = self.foundation_drag(evt)
|
||||
|
||||
elif evt.type == "click":
|
||||
if evt.stack == self.stock:
|
||||
rv = self.stock_click(evt)
|
||||
|
||||
elif evt.type == "doubleclick":
|
||||
if (evt.stack in self.tableau) or (evt.stack is self.waste):
|
||||
rv = self.tableau_doubleclick(evt)
|
||||
|
||||
# Ensure that the bottom card in each tableau is faceup.
|
||||
for i in range(0, 7):
|
||||
if self.tableau[i]:
|
||||
self.table.set_faceup(self.tableau[i][-1], True)
|
||||
|
||||
# Check to see if any of the foundations has less than
|
||||
# 13 cards in it. If it does, return False. Otherwise,
|
||||
# return True.
|
||||
for i in self.foundations:
|
||||
if len(i) != 13:
|
||||
return rv
|
||||
|
||||
return "win"
|
||||
|
||||
# Sets things as sensitive (or not).
|
||||
def set_sensitive(self, value):
|
||||
self.table.set_sensitive(value)
|
||||
|
||||
# Utility functions.
|
||||
|
||||
# Is it okay to drag the over card onto under, where under is
|
||||
# part of a tableau.
|
||||
def can_hint(self, under, over):
|
||||
usuit, urank = under
|
||||
osuit, orank = over
|
||||
|
||||
if orank == 1:
|
||||
return False
|
||||
|
||||
ublack = (usuit == self.SPADE) or (usuit == self.CLUB)
|
||||
oblack = (osuit == self.SPADE) or (osuit == self.CLUB)
|
||||
|
||||
if (oblack != ublack) and (orank == urank - 1):
|
||||
return True
|
||||
|
||||
# Returns the first faceup card in the stack.
|
||||
def first_faceup(self, s):
|
||||
for c in s:
|
||||
if self.table.get_faceup(c):
|
||||
return c
|
||||
|
||||
# This tries to find a reasonable hint, and returns it as a
|
||||
# pair of cardnames.
|
||||
def hint(self):
|
||||
|
||||
for i in self.tableau:
|
||||
if not i:
|
||||
continue
|
||||
|
||||
over = self.first_faceup(i)
|
||||
|
||||
for j in self.tableau:
|
||||
if not j or i is j:
|
||||
continue
|
||||
|
||||
under = j[-1]
|
||||
|
||||
if self.can_hint(under, over):
|
||||
return (under, over)
|
||||
|
||||
if self.waste:
|
||||
|
||||
over = self.waste[-1]
|
||||
|
||||
for j in self.tableau:
|
||||
if not j:
|
||||
continue
|
||||
|
||||
under = j[-1]
|
||||
|
||||
if self.can_hint(under, over):
|
||||
return (under, over)
|
||||
|
||||
return None, None
|
||||
|
||||
def card_name(self, c):
|
||||
suit, rank = c
|
||||
|
||||
return [
|
||||
"INVALID",
|
||||
"Ace",
|
||||
"Two",
|
||||
"Three",
|
||||
"four",
|
||||
"Five",
|
||||
"Six",
|
||||
"Seven",
|
||||
"Eight",
|
||||
"Nine",
|
||||
"Ten",
|
||||
"Jack",
|
||||
"Queen",
|
||||
"King" ][rank] + " of " + [
|
||||
"Clubs",
|
||||
"Spades",
|
||||
"Hearts",
|
||||
"Diamonds" ][suit]
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 138 KiB |
@@ -1,184 +0,0 @@
|
||||
# You can place the script of your game in this file.
|
||||
|
||||
init:
|
||||
$ e = Character('Eileen', color="#c8ffc8")
|
||||
|
||||
image eileen happy = "eileen_happy.png"
|
||||
image bg table = "table.jpg"
|
||||
image dim = "#0008"
|
||||
|
||||
# Some styles for show text.
|
||||
$ style.centered_text.drop_shadow = (2, 2)
|
||||
$ style.centered_text.drop_shadow_color = "#000b"
|
||||
|
||||
label start:
|
||||
|
||||
scene bg table
|
||||
|
||||
python:
|
||||
k = Klondike(1)
|
||||
k.set_sensitive(False)
|
||||
k.show()
|
||||
|
||||
show dim
|
||||
show eileen happy
|
||||
with dissolve
|
||||
|
||||
e "Welcome to the cardgame demo. Let's play some solitaire!"
|
||||
|
||||
e "I might show up from time to time to give you some advice, but it's up to you if you want to take it."
|
||||
|
||||
e "Good luck!"
|
||||
|
||||
label continue:
|
||||
|
||||
hide dim
|
||||
hide eileen
|
||||
with dissolve
|
||||
|
||||
label quick_continue:
|
||||
|
||||
$ hint_count = renpy.random.randint(10, 20)
|
||||
|
||||
while True:
|
||||
|
||||
python:
|
||||
|
||||
ui.textbutton("Give Up", ui.jumps("giveup"), xalign=.02, yalign=.98)
|
||||
k.set_sensitive(True)
|
||||
event = k.interact()
|
||||
|
||||
if event:
|
||||
renpy.checkpoint()
|
||||
|
||||
if event == "win":
|
||||
jump win
|
||||
|
||||
if event == "tableau_drag" or event == "stock_click":
|
||||
$ hint_count -= 1
|
||||
if hint_count <= 0:
|
||||
jump hint
|
||||
|
||||
label win:
|
||||
|
||||
show dim
|
||||
show eileen happy
|
||||
with dissolve
|
||||
|
||||
"Congratulations!"
|
||||
|
||||
jump newgame
|
||||
|
||||
label giveup:
|
||||
|
||||
$ k.set_sensitive(False)
|
||||
|
||||
show dim
|
||||
show eileen happy
|
||||
with dissolve
|
||||
|
||||
menu:
|
||||
e "Are you sure you want to give up?"
|
||||
|
||||
"Yes":
|
||||
|
||||
"Oh well, better luck next time."
|
||||
|
||||
jump newgame
|
||||
|
||||
"No":
|
||||
|
||||
jump continue
|
||||
|
||||
label newgame:
|
||||
|
||||
menu:
|
||||
e "Would you like to try again?"
|
||||
|
||||
"Yes":
|
||||
pass
|
||||
|
||||
"No":
|
||||
e "Well, I hope to see you again soon."
|
||||
return
|
||||
|
||||
e "Okay, here we go!"
|
||||
|
||||
scene bg table
|
||||
|
||||
python:
|
||||
k = Klondike(1)
|
||||
k.sensitive = False
|
||||
k.show()
|
||||
|
||||
jump continue
|
||||
|
||||
|
||||
label hint:
|
||||
|
||||
$ under, over = k.hint()
|
||||
|
||||
$ print under, over
|
||||
|
||||
if under is None:
|
||||
jump quick_continue
|
||||
|
||||
$ under = k.card_name(under)
|
||||
$ over = k.card_name(over)
|
||||
|
||||
$ k.set_sensitive(False)
|
||||
|
||||
show dim
|
||||
show eileen happy
|
||||
with dissolve
|
||||
|
||||
$ hint = renpy.random.randint(0, 2)
|
||||
|
||||
if hint == 0:
|
||||
e "Maybe put the %(over)s on top of the %(under)s."
|
||||
|
||||
elif hint == 1:
|
||||
e "You can try moving the %(over)s to the %(under)s."
|
||||
|
||||
elif hint == 2:
|
||||
e "I think something can go on the %(under)s."
|
||||
|
||||
jump continue
|
||||
|
||||
|
||||
# This has nothing to do with card games.
|
||||
label splashscreen:
|
||||
|
||||
scene bg table
|
||||
$ renpy.pause(1.0)
|
||||
|
||||
show text "According to legend, prospectors in the klondike would carry with them a deck of cards."
|
||||
with dissolve
|
||||
with Pause(5.0)
|
||||
hide text
|
||||
with dissolve
|
||||
with Pause(1.0)
|
||||
|
||||
show text "If they were ever lost, they'd start playing a game of solitaire."
|
||||
with dissolve
|
||||
with Pause(4.0)
|
||||
hide text
|
||||
with dissolve
|
||||
with Pause(1.0)
|
||||
|
||||
show text "Without fail, help would soon arrive..."
|
||||
with dissolve
|
||||
with Pause(3.0)
|
||||
hide text
|
||||
with dissolve
|
||||
with Pause(1.0)
|
||||
|
||||
show text "... saying \"put the Five of Spades on the Six of Hearts.\""
|
||||
|
||||
with dissolve
|
||||
with Pause(4.0)
|
||||
hide text
|
||||
with dissolve
|
||||
with Pause(1.0)
|
||||
|
||||
return
|
||||
|
Before Width: | Height: | Size: 116 KiB |
@@ -0,0 +1,35 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains warpers that are used by ATL. They need to be defined
|
||||
# early, so Ren'Py knows about them when parsing other files.
|
||||
|
||||
python early hide:
|
||||
|
||||
# pause is defined internally, but would look like:
|
||||
#
|
||||
# @renpy.atl_warper
|
||||
# def pause(t):
|
||||
# if t >= 1.0:
|
||||
# return 1.0
|
||||
# else:
|
||||
# return 0.0
|
||||
|
||||
@renpy.atl_warper
|
||||
def linear(t):
|
||||
return t
|
||||
|
||||
@renpy.atl_warper
|
||||
def easeout(x):
|
||||
import math
|
||||
return 1.0 - math.cos(x * math.pi / 2.0)
|
||||
|
||||
@renpy.atl_warper
|
||||
def easein(x):
|
||||
import math
|
||||
return math.cos((1.0 - x) * math.pi / 2.0)
|
||||
|
||||
@renpy.atl_warper
|
||||
def ease(x):
|
||||
import math
|
||||
return .5 - math.cos(math.pi * x) / 2.0
|
||||
@@ -1,3 +1,6 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1210 python:
|
||||
|
||||
# This is called when script_version is set, to immediately
|
||||
@@ -13,6 +16,53 @@ init -1210 python:
|
||||
if version <= (6, 5, 0):
|
||||
layout.compat()
|
||||
|
||||
if version <= (6, 9, 1):
|
||||
store.library = store.config
|
||||
|
||||
if version <= (6, 9, 3):
|
||||
|
||||
# Before 6.10, these were positions, rather than transforms.
|
||||
store.left = Position(xalign=0.0)
|
||||
store.center = Position(xalign=0.5)
|
||||
store.truecenter = Position(xalign=0.5, yalign=0.5)
|
||||
store.right = Position(xalign=1.0)
|
||||
store.offscreenleft = Position(xpos=0.0, xanchor=1.0)
|
||||
store.offscreenright = Position(xpos=1.0, xanchor=0.0)
|
||||
|
||||
if version <= (6, 10, 2):
|
||||
# Before 6.11, we used the image placement to handle
|
||||
# the location of things on the screen.
|
||||
style.image_placement.xpos = 0.5
|
||||
style.image_placement.ypos = 1.0
|
||||
style.image_placement.xanchor = 0.5
|
||||
style.image_placement.yanchor = 1.0
|
||||
|
||||
config.transform_uses_child_position = False
|
||||
config.default_transform = None
|
||||
config.start_scene_black = True
|
||||
|
||||
if version <= (6, 11, 0):
|
||||
config.movetransition_respects_offsets = False
|
||||
|
||||
if version <= (6, 11, 2):
|
||||
config.imagereference_respects_position = True
|
||||
config.predict_screens = False
|
||||
config.choice_screen_chosen = False
|
||||
|
||||
if version <= (6, 12, 0):
|
||||
config.keep_running_transform = False
|
||||
config.image_attributes = False
|
||||
config.new_character_image_argument = False
|
||||
config.save_physical_size = False
|
||||
|
||||
if version <= (6, 12, 2):
|
||||
style.default.language = "western"
|
||||
style.default.layout = "greedy"
|
||||
config.old_substitutions = True
|
||||
config.new_substitutions = False
|
||||
config.broken_line_spacing = True
|
||||
|
||||
|
||||
init 1210 python hide::
|
||||
|
||||
# This returns true if the script_version is <= the
|
||||
@@ -54,6 +104,9 @@ init 1210 python hide::
|
||||
if compat(6, 2, 0):
|
||||
config.reject_backslash = False
|
||||
|
||||
if compat(6, 9, 0):
|
||||
style.motion.clear()
|
||||
|
||||
if "Fullscreen" in config.translations:
|
||||
fs = _("Fullscreen")
|
||||
config.translations.setdefault("Fullscreen 4:3", fs + " 4:3")
|
||||
@@ -62,3 +115,8 @@ init 1210 python hide::
|
||||
|
||||
for i in layout.compat_funcs:
|
||||
i()
|
||||
|
||||
if config.hyperlink_styler or config.hyperlink_callback or config.hyperlink_focus:
|
||||
style.default.hyperlink_functions = (config.hyperlink_styler, config.hyperlink_callback, config.hyperlink_focus)
|
||||
|
||||
|
||||
@@ -1,27 +1,60 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains a number of definitions of standard
|
||||
# locations and transitions. We've moved them into the common
|
||||
# directory so that it's easy for an updated version of all of these
|
||||
# definitions.
|
||||
|
||||
init -1110:
|
||||
|
||||
transform reset:
|
||||
alpha 1 rotate None zoom 1 xzoom 1 yzoom 1 align (0, 0) alignaround (0, 0) subpixel False size None crop None
|
||||
|
||||
# These are positions that can be used inside at clauses. We set
|
||||
# them up here so that they can be used throughout the program.
|
||||
transform left:
|
||||
xpos 0.0 xanchor 0.0 ypos 1.0 yanchor 1.0
|
||||
|
||||
transform right:
|
||||
xpos 1.0 xanchor 1.0 ypos 1.0 yanchor 1.0
|
||||
|
||||
transform center:
|
||||
xpos 0.5 xanchor 0.5 ypos 1.0 yanchor 1.0
|
||||
|
||||
transform truecenter:
|
||||
xpos 0.5 xanchor 0.5 ypos 0.5 yanchor 0.5
|
||||
|
||||
transform topleft:
|
||||
xpos 0.0 xanchor 0.0 ypos 0.0 yanchor 0.0
|
||||
|
||||
transform topright:
|
||||
xpos 1.0 xanchor 1.0 ypos 0.0 yanchor 0.0
|
||||
|
||||
transform top:
|
||||
xpos 0.5 xanchor 0.5 ypos 0.0 yanchor 0.0
|
||||
|
||||
# Offscreen positions for use with the move transition. Images at
|
||||
# these positions are still shown (and consume
|
||||
# resources)... remember to hide the image after the transition.
|
||||
transform offscreenleft:
|
||||
xpos 0.0 xanchor 1.0 ypos 1.0 yanchor 1.0
|
||||
|
||||
transform offscreenright:
|
||||
xpos 1.0 xanchor 0.0 ypos 1.0 yanchor 1.0
|
||||
|
||||
transform default:
|
||||
alpha 1 rotate None zoom 1 xzoom 1 yzoom 1 align (0, 0) alignaround (0, 0) subpixel False size None crop None
|
||||
xpos 0.5 xanchor 0.5 ypos 1.0 yanchor 1.0
|
||||
|
||||
python:
|
||||
config.default_transform = default
|
||||
|
||||
|
||||
init -1110 python:
|
||||
|
||||
_define = define = object()
|
||||
|
||||
# Positions ##############################################################
|
||||
|
||||
# These are positions that can be used inside at clauses. We set
|
||||
# them up here so that they can be used throughout the program.
|
||||
left = Position(xalign=0.0)
|
||||
center = Position(xalign=0.5)
|
||||
truecenter = Position(xalign=0.5, yalign=0.5)
|
||||
right = Position(xalign=1.0)
|
||||
|
||||
# Offscreen positions for use with the move transition. Images at
|
||||
# these positions are still shown (and consume
|
||||
# resources)... remember to hide the image after the transition.
|
||||
offscreenleft = Position(xpos=0.0, xanchor=1.0)
|
||||
offscreenright = Position(xpos=1.0, xanchor=0.0)
|
||||
|
||||
# Transitions ############################################################
|
||||
|
||||
# Simple transitions.
|
||||
@@ -62,60 +95,118 @@ init -1110 python:
|
||||
return .5 - math.cos(math.pi * x) / 2.0
|
||||
|
||||
# This defines a family of move transitions.
|
||||
def move_transitions(prefix, delay, time_warp=None, in_time_warp=None, out_time_warp=None, old=False):
|
||||
def move_transitions(prefix, delay, time_warp=None, in_time_warp=None, out_time_warp=None, old=False, layers=[ 'master' ], **kwargs):
|
||||
"""
|
||||
:doc: transition_family
|
||||
|
||||
This defines a family of move transitions, similar to the move and ease
|
||||
transitions. For a given `prefix`, this defines the transitions:
|
||||
|
||||
* *prefix*- A transition that takes `delay` seconds to move images that
|
||||
changed positions to their new locations.
|
||||
|
||||
* *prefix*\ inleft, *prefix*\ inright, *prefix*\ intop, *prefix*\ inbottom - Transitions
|
||||
that take `delay` seconds to move images that changed positions to their
|
||||
new locations, with newly shown images coming in from the appropriate
|
||||
side.
|
||||
|
||||
* *prefix*\ outleft, *prefix*\ outright, *prefix*\ outtop, *prefix*\ outbottom -
|
||||
Transitions that take `delay` seconds to move images that changed
|
||||
positions to their new locations, with newly hidden images leaving via
|
||||
the appropriate side.
|
||||
|
||||
`time_warp`, `in_time_warp`, `out_time_warp`
|
||||
Time warp functions that are given a time from 0.0 to 1.0 representing
|
||||
the fraction of the move complete, and return a value in the same
|
||||
range giving the fraction of a linear move that is complete.
|
||||
|
||||
This can be used to define functions that ease the images around,
|
||||
rather than moving them at a constant speed.
|
||||
|
||||
The three argument are used for images remaining on the screen,
|
||||
newly shown images, and newly hidden images, respectively.
|
||||
|
||||
`old`
|
||||
If true, the transitions to move the old displayables, rather than the new ones.
|
||||
|
||||
`layers`
|
||||
The layers the transition will apply to.
|
||||
|
||||
Additional keyword arguments are passed (indirectly) to the moves. The
|
||||
most useful additional keyword argument is probably subpixel=True,
|
||||
which causes a subpixel move to be used.
|
||||
|
||||
::
|
||||
|
||||
# This defines all of the pre-defined transitions beginning
|
||||
# with "move".
|
||||
init python:
|
||||
define.move_transitions("move", 0.5)
|
||||
|
||||
"""
|
||||
|
||||
moves = {
|
||||
"" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
factory=MoveFactory(time_warp=time_warp)),
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs)),
|
||||
|
||||
"inright" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
factory=MoveFactory(time_warp=time_warp),
|
||||
enter_factory=MoveIn((1.0, None, 0.0, None), time_warp=in_time_warp)),
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((1.0, None, 0.0, None), time_warp=in_time_warp, **kwargs)),
|
||||
|
||||
"inleft" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
factory=MoveFactory(time_warp=time_warp),
|
||||
enter_factory=MoveIn((0.0, None, 1.0, None), time_warp=in_time_warp)),
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((0.0, None, 1.0, None), time_warp=in_time_warp, **kwargs)),
|
||||
|
||||
"intop" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
factory=MoveFactory(time_warp=time_warp),
|
||||
enter_factory=MoveIn((None, 0.0, None, 1.0), time_warp=in_time_warp)),
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((None, 0.0, None, 1.0), time_warp=in_time_warp, **kwargs)),
|
||||
|
||||
"inbottom" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
factory=MoveFactory(time_warp=time_warp),
|
||||
enter_factory=MoveIn((None, 1.0, None, 0.0), time_warp=in_time_warp)),
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((None, 1.0, None, 0.0), time_warp=in_time_warp, **kwargs)),
|
||||
|
||||
"outright" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
factory=MoveFactory(time_warp=time_warp),
|
||||
leave_factory=MoveOut((1.0, None, 0.0, None), time_warp=out_time_warp)),
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((1.0, None, 0.0, None), time_warp=out_time_warp, **kwargs)),
|
||||
|
||||
"outleft" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
factory=MoveFactory(time_warp=time_warp),
|
||||
leave_factory=MoveOut((0.0, None, 1.0, None), time_warp=out_time_warp)),
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((0.0, None, 1.0, None), time_warp=out_time_warp, **kwargs)),
|
||||
|
||||
"outtop" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
factory=MoveFactory(time_warp=time_warp),
|
||||
leave_factory=MoveOut((None, 0.0, None, 1.0), time_warp=out_time_warp)),
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((None, 0.0, None, 1.0), time_warp=out_time_warp, **kwargs)),
|
||||
|
||||
"outbottom" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
factory=MoveFactory(time_warp=time_warp),
|
||||
leave_factory=MoveOut((None, 1.0, None, 0.0), time_warp=time_warp)),
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((None, 1.0, None, 0.0), time_warp=time_warp, **kwargs)),
|
||||
}
|
||||
|
||||
for k, v in moves.iteritems():
|
||||
@@ -131,8 +222,6 @@ init -1110 python:
|
||||
zoomin = MoveTransition(0.5, enter_factory=ZoomInOut(0.01, 1.0))
|
||||
zoomout = MoveTransition(0.5, leave_factory=ZoomInOut(1.0, 0.01))
|
||||
zoominout = MoveTransition(0.5, enter_factory=ZoomInOut(0.01, 1.0), leave_factory=ZoomInOut(1.0, 0.01))
|
||||
|
||||
|
||||
|
||||
# These shake the screen up and down for a quarter second.
|
||||
# The delay needs to be an integer multiple of the period.
|
||||
@@ -156,3 +245,7 @@ init 1110 python:
|
||||
|
||||
if not hasattr(store, 'centered'):
|
||||
centered = Character(None, what_style="centered_text", window_style="centered_window")
|
||||
|
||||
# This is necessary to ensure that config.default_transform works.
|
||||
if config.default_transform:
|
||||
config.default_transform._show()
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
# Entry point for the developer console.
|
||||
label _developer:
|
||||
|
||||
if not config.developer:
|
||||
return
|
||||
|
||||
call _enter_menu from _call__enter_menu_4
|
||||
|
||||
label _developer_screen:
|
||||
|
||||
python hide:
|
||||
|
||||
ui.window(style=style.gm_root)
|
||||
ui.null()
|
||||
|
||||
ui.frame(xpos=10, ypos=10, style=style.menu_frame)
|
||||
ui.vbox(box_first_spacing=10)
|
||||
layout.label(u"Developer Menu", None)
|
||||
|
||||
sg = "developer_menu"
|
||||
|
||||
layout.button("Return", None, clicked=ui.returns(True), size_group=sg)
|
||||
layout.button("Reload Game (Shift+R)", None, clicked=ui.callsinnewcontext("_save_reload_game"), size_group=sg)
|
||||
layout.button("Variable Viewer", None, clicked=ui.jumps("_debugger_screen"), size_group=sg)
|
||||
layout.button("Theme Test", None, clicked=ui.jumps("_theme_test"), size_group=sg)
|
||||
layout.button("Style Hierarchy", None, clicked=ui.jumps("_style_hierarchy"), size_group=sg)
|
||||
|
||||
ui.close()
|
||||
ui.interact()
|
||||
|
||||
return
|
||||
|
||||
label _debugger_screen:
|
||||
|
||||
python hide:
|
||||
|
||||
ui.window(style=style.gm_root)
|
||||
ui.null()
|
||||
|
||||
ui.frame(ymargin=10, xmargin=10, style=style.menu_frame)
|
||||
ui.side(['t', 'c', 'r', 'b'])
|
||||
|
||||
layout.label("Variable Viewer", None)
|
||||
|
||||
entries = [ ]
|
||||
|
||||
ebc = renpy.game.log.ever_been_changed
|
||||
ebc = list(ebc)
|
||||
ebc.sort()
|
||||
|
||||
ebc.remove("nvl_list")
|
||||
|
||||
import repr
|
||||
aRepr = repr.Repr()
|
||||
aRepr.maxstring = 40
|
||||
|
||||
for var in ebc:
|
||||
if not hasattr(store, var):
|
||||
continue
|
||||
|
||||
if var.startswith("__00"):
|
||||
continue
|
||||
|
||||
if var.startswith("_") and not var.startswith("__"):
|
||||
continue
|
||||
|
||||
val = aRepr.repr(getattr(store, var))
|
||||
entries.append((0, (var + " = " + val).replace("{", "{{")))
|
||||
|
||||
if entries:
|
||||
vp = ui.viewport(mousewheel=True)
|
||||
layout.list(entries)
|
||||
ui.bar(adjustment=vp.yadjustment, style='vscrollbar')
|
||||
else:
|
||||
layout.prompt("No variables have changed since the game started.", None)
|
||||
ui.null()
|
||||
|
||||
layout.button(u"Return to the developer menu", None, clicked=ui.returns(True))
|
||||
|
||||
ui.close()
|
||||
|
||||
ui.interact()
|
||||
|
||||
jump _developer_screen
|
||||
|
||||
label _theme_test:
|
||||
|
||||
python hide:
|
||||
|
||||
# Never gets pickled
|
||||
def role(b):
|
||||
if b:
|
||||
return "selected_"
|
||||
else:
|
||||
return ""
|
||||
|
||||
toggle_var = True
|
||||
adj = ui.adjustment(100, 25, page=25)
|
||||
|
||||
while True:
|
||||
|
||||
ui.window(style=style.gm_root)
|
||||
ui.null()
|
||||
|
||||
# Buttons
|
||||
ui.hbox(box_spacing=10, xpos=10, ypos=10)
|
||||
|
||||
ui.vbox(box_spacing=10)
|
||||
|
||||
sg = "theme_test"
|
||||
|
||||
ui.frame(style='menu_frame')
|
||||
ui.vbox()
|
||||
layout.label("Button", None)
|
||||
ui.textbutton("Button", size_group=sg, clicked=ui.returns("gndn"))
|
||||
ui.textbutton("Button (Selected)", size_group=sg, clicked=ui.returns("gndn"), role=role(True))
|
||||
ui.textbutton("Small", clicked=ui.returns("gndn"), style='small_button')
|
||||
ui.close()
|
||||
|
||||
ui.frame(style='menu_frame')
|
||||
ui.vbox()
|
||||
layout.label("Radio Button", None)
|
||||
ui.textbutton("True", size_group=sg, clicked=ui.returns("set"), role=role(toggle_var), style='radio_button')
|
||||
ui.textbutton("False", size_group=sg, clicked=ui.returns("unset"), role=role(not toggle_var), style='radio_button')
|
||||
ui.close()
|
||||
|
||||
ui.frame(style='menu_frame')
|
||||
ui.vbox()
|
||||
layout.label("Check Button", None)
|
||||
ui.textbutton("Check Button", size_group=sg, clicked=ui.returns("toggle"), role=role(toggle_var), style='check_button')
|
||||
ui.close()
|
||||
|
||||
ui.frame(style='menu_frame')
|
||||
ui.vbox(box_spacing=2)
|
||||
ui.bar(adjustment=adj, style='bar', xmaximum=200)
|
||||
ui.bar(adjustment=adj, style='slider', xmaximum=200)
|
||||
ui.bar(adjustment=adj, style='scrollbar', xmaximum=200)
|
||||
ui.close()
|
||||
|
||||
ui.close() # vbox
|
||||
|
||||
ui.frame(style='menu_frame')
|
||||
ui.hbox(box_spacing=2)
|
||||
ui.bar(adjustment=adj, style='vbar', ymaximum=200)
|
||||
ui.bar(adjustment=adj, style='vslider', ymaximum=200)
|
||||
ui.bar(adjustment=adj, style='vscrollbar', ymaximum=200)
|
||||
ui.close()
|
||||
|
||||
ui.frame(style='menu_frame', xmaximum=0.95)
|
||||
ui.vbox(box_spacing=20)
|
||||
layout.prompt("This a prompt. Hopefully, we've made this long enough to wrap around at least once.", None)
|
||||
ui.close()
|
||||
|
||||
ui.close() # hbox
|
||||
|
||||
ui.frame(style='menu_frame', xalign=.01, yalign=.99)
|
||||
ui.textbutton("Return to the developer menu", clicked=ui.returns("return"))
|
||||
|
||||
rv = ui.interact()
|
||||
if rv == "return":
|
||||
renpy.jump("_developer_screen")
|
||||
|
||||
elif rv == "set":
|
||||
toggle_var = True
|
||||
elif rv == "unset":
|
||||
toggle_var = False
|
||||
elif rv == "toggle":
|
||||
toggle_var = not toggle_var
|
||||
|
||||
label _style_hierarchy:
|
||||
|
||||
python hide:
|
||||
|
||||
ui.window(style=style.gm_root)
|
||||
ui.null()
|
||||
|
||||
ui.frame(ymargin=10, xmargin=10, style=style.menu_frame)
|
||||
ui.side(['t', 'c', 'r', 'b'], spacing=2)
|
||||
|
||||
layout.label("Style Hierarchy", None)
|
||||
|
||||
hier = renpy.style.style_hierarchy()
|
||||
|
||||
entries = [ (i[0], i[1] + " - " + str(i[2])) for i in hier if i[2] ]
|
||||
|
||||
vp = ui.viewport(mousewheel=True)
|
||||
layout.list(entries)
|
||||
ui.bar(adjustment=vp.yadjustment, style='vscrollbar')
|
||||
|
||||
layout.button(u"Return to the developer menu", None, clicked=ui.returns(True))
|
||||
|
||||
ui.close()
|
||||
|
||||
ui.interact()
|
||||
|
||||
jump _developer_screen
|
||||
|
||||
|
||||
init 1050 python:
|
||||
|
||||
if renpy.game.options.remote:
|
||||
|
||||
config.window_title = "Preview: " + config.window_title
|
||||
|
||||
class Remote(renpy.Displayable):
|
||||
|
||||
def render(self, width, height, st, at):
|
||||
return renpy.Render(0, 0)
|
||||
|
||||
def event(self, ev, x, y, st):
|
||||
renpy.remote.remote()
|
||||
renpy.timeout(.05)
|
||||
|
||||
config.underlay.append(Remote())
|
||||
del Remote
|
||||
|
||||
|
||||
@@ -0,0 +1,329 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1135 python:
|
||||
|
||||
class __GalleryAllPriorCondition(object):
|
||||
|
||||
def check(self, all_prior):
|
||||
return all_prior
|
||||
|
||||
|
||||
class __GalleryArbitraryCondition(object):
|
||||
def __init__(self, condition):
|
||||
self.condition = condition
|
||||
|
||||
def check(self, all_prior):
|
||||
return eval(self.condition)
|
||||
|
||||
|
||||
class __GalleryUnlockCondition(object):
|
||||
def __init__(self, images):
|
||||
self.images = images
|
||||
|
||||
def check(self, all_prior):
|
||||
for i in self.images:
|
||||
if not renpy.seen_image(i):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class __GalleryImage(object):
|
||||
def __init__(self, gallery, displayables):
|
||||
|
||||
# The gallery object we belong to.
|
||||
self.gallery = gallery
|
||||
|
||||
# A list of conditions for this image to be displayed.
|
||||
self.conditions = [ ]
|
||||
|
||||
# A list of displayables to show.
|
||||
self.displayables = displayables
|
||||
|
||||
# A list of transforms to apply to those displayables, or None
|
||||
# to not apply a transform.
|
||||
self.transforms = [ None ] * len(displayables)
|
||||
|
||||
|
||||
def check_unlock(self, all_prior):
|
||||
"""
|
||||
Returns True if the image is unlocked.
|
||||
"""
|
||||
|
||||
for i in self.conditions:
|
||||
if not i.check(all_prior):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def show(self, locked, index, count):
|
||||
"""
|
||||
Shows this image when it's unlocked.
|
||||
"""
|
||||
|
||||
renpy.transition(self.gallery.transition)
|
||||
ui.saybehavior()
|
||||
|
||||
displayables = [ ]
|
||||
|
||||
for d, transform in zip(self.displayables, self.transforms):
|
||||
|
||||
if transform is not None:
|
||||
d = transform(d)
|
||||
else:
|
||||
d = config.default_transform(d)
|
||||
|
||||
displayables.append(d)
|
||||
|
||||
renpy.show_screen("_gallery", locked=locked, index=index + 1, count=count, displayables=displayables, gallery=self.gallery)
|
||||
ui.interact()
|
||||
|
||||
class __GalleryButton(object):
|
||||
def __init__(self, gallery):
|
||||
self.gallery = gallery
|
||||
self.images = [ ]
|
||||
self.conditions = [ ]
|
||||
|
||||
def check_unlock(self):
|
||||
for i in self.conditions:
|
||||
if not i.check(True):
|
||||
return False
|
||||
|
||||
for i in self.images:
|
||||
if i.check_unlock(False):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def show(self):
|
||||
|
||||
all_prior = True
|
||||
|
||||
for i, img in enumerate(self.images):
|
||||
locked = not img.check_unlock(all_prior)
|
||||
img.show(locked, i, len(self.images))
|
||||
|
||||
renpy.transition(self.gallery.transition)
|
||||
|
||||
class Gallery(object):
|
||||
"""
|
||||
:doc: gallery class
|
||||
|
||||
This class supports the creation of an image gallery by handling the
|
||||
locking of images, providing an action that can show one or more images,
|
||||
and a providing method that creates buttons that use that action.
|
||||
|
||||
.. attribute:: transition
|
||||
|
||||
The transition that is used when changing images.
|
||||
|
||||
.. attribute:: locked_button
|
||||
|
||||
The default displayable used by make_button for a locked button.
|
||||
|
||||
.. attribute:: hover_border
|
||||
|
||||
The default hover border used by make_button.
|
||||
|
||||
.. attribute:: idle_border
|
||||
|
||||
The default idle border used by make_button.
|
||||
"""
|
||||
|
||||
transition = None
|
||||
|
||||
hover_border = None
|
||||
idle_border = None
|
||||
|
||||
locked_button = None
|
||||
|
||||
def __init__(self):
|
||||
|
||||
# A map from button name (or image) to __GalleryButton object.
|
||||
self.buttons = { }
|
||||
|
||||
self.button_ = None
|
||||
self.image_ = None
|
||||
self.unlockable = None
|
||||
|
||||
def button(self, name):
|
||||
"""
|
||||
:doc: gallery method
|
||||
|
||||
Creates a new button, named `name`.
|
||||
|
||||
`name`
|
||||
The name of the button being created.
|
||||
"""
|
||||
|
||||
self.button_ = __GalleryButton(self)
|
||||
self.unlockable = self.button_
|
||||
self.buttons[name] = self.button_
|
||||
|
||||
def image(self, *displayables):
|
||||
"""
|
||||
:doc: gallery method
|
||||
|
||||
Adds a new image to the current button, where an image consists
|
||||
of one or more displayables.
|
||||
"""
|
||||
|
||||
self.image_ = __GalleryImage(self, displayables)
|
||||
self.button_.images.append(self.image_)
|
||||
self.unlockable = self.image_
|
||||
|
||||
display = image
|
||||
|
||||
def transform(self, *transforms):
|
||||
"""
|
||||
:doc: gallery method
|
||||
|
||||
Applies transforms to the last image registered. This should be
|
||||
called with the same number of transforms as the image has
|
||||
displayables. The transforms are applied to the corresponding
|
||||
displayables.
|
||||
|
||||
If a transform is None, the default transform is used.
|
||||
"""
|
||||
|
||||
self.image_.transforms = transforms
|
||||
|
||||
def unlock(self, *images):
|
||||
"""
|
||||
:doc: gallery method
|
||||
|
||||
A condition that takes one or more image names as argument, and
|
||||
is satisfied when all the named images have been seen by the
|
||||
player. The image names should be given as strings.
|
||||
"""
|
||||
|
||||
self.unlockable.conditions.append(__GalleryUnlockCondition(images))
|
||||
|
||||
def condition(self, expression):
|
||||
"""
|
||||
:doc: gallery method
|
||||
|
||||
A condition that is satisfied when an expression evaluates to true.
|
||||
|
||||
`expression`
|
||||
A string giving a python expression.
|
||||
"""
|
||||
|
||||
if not isinstance(expression, basestring):
|
||||
raise Exception("Gallery condition must be a string containing an expression.")
|
||||
|
||||
self.unlockable.conditions.append(__GalleryArbitraryCondition(expression))
|
||||
|
||||
def allprior(self):
|
||||
"""
|
||||
:doc: gallery method
|
||||
|
||||
A condition that is true if all prior images associated with the
|
||||
current button have been unlocked.
|
||||
"""
|
||||
|
||||
self.unlockable.conditions.append(__GalleryAllPriorCondition())
|
||||
|
||||
def unlock_image(self, *images):
|
||||
"""
|
||||
:doc: gallery method
|
||||
|
||||
A convenience method that is equivalent to calling image and unlock
|
||||
with the same parameters. This will cause an image to be displayed
|
||||
if it has been seen before.
|
||||
|
||||
The images should be specified as strings giving image names.
|
||||
"""
|
||||
|
||||
self.image(*images)
|
||||
self.unlock(*images)
|
||||
|
||||
def Action(self, name):
|
||||
"""
|
||||
:doc: gallery method
|
||||
|
||||
An action that displays the images associated with the given button
|
||||
name.
|
||||
"""
|
||||
|
||||
if name not in self.buttons:
|
||||
raise Exception("{0!r} is not a button defined in this gallery.".format(name))
|
||||
|
||||
b = self.buttons[name]
|
||||
|
||||
if b.check_unlock():
|
||||
return ui.invokesinnewcontext(b.show)
|
||||
else:
|
||||
return None
|
||||
|
||||
def make_button(self, name, unlocked, locked=None, hover_border=None, idle_border=None, **properties):
|
||||
"""
|
||||
:doc: gallery method
|
||||
|
||||
This creates a button that displays the images associated with the given
|
||||
button name.
|
||||
|
||||
`name`
|
||||
The name of the button that will be created.
|
||||
|
||||
`unlocked`
|
||||
A displayable that is displayed for this button when it is
|
||||
unlocked.
|
||||
|
||||
`locked`
|
||||
A displayable that is displayed for this button when it is
|
||||
locked. If None, the locked_button field of the gallery
|
||||
object is used instead.
|
||||
|
||||
`hover_border`
|
||||
A displayable that is used to overlay this button when when
|
||||
it is unlocked and has focus. If None, the hover_border
|
||||
field of the gallery object is used.
|
||||
|
||||
`idle_border`
|
||||
A displayable that is used to overlay this button when when
|
||||
it is unlocked but unfocused. If None, the idle_border
|
||||
field of the gallery object is used.
|
||||
|
||||
Additional keyword arguments become style properties of the
|
||||
created button object.
|
||||
"""
|
||||
|
||||
action = self.Action(name)
|
||||
|
||||
if locked is None:
|
||||
locked = self.locked_button
|
||||
|
||||
if hover_border is None:
|
||||
hover_border = self.hover_border
|
||||
|
||||
if idle_border is None:
|
||||
idle_border = self.idle_border
|
||||
|
||||
return Button(action=action, child=unlocked, insensitive_child=locked, hover_foreground=hover_border, idle_foreground=idle_border, **properties)
|
||||
|
||||
|
||||
init -1135:
|
||||
|
||||
# Displays a set of images in the gallery, or indicates that the images
|
||||
# are locked. This is given the following arguments:
|
||||
#
|
||||
# locked
|
||||
# True if the image is locked.
|
||||
# displayables
|
||||
# A list of transformed displayables that should be shown to the user.
|
||||
# index
|
||||
# A 1-based index of the image being shown.
|
||||
# count
|
||||
# The number of images attached to the current button.
|
||||
# gallery
|
||||
# The image gallery object.
|
||||
screen _gallery:
|
||||
if locked:
|
||||
add "#000"
|
||||
text "Image [index] of [count] locked." align (0.5, 0.5)
|
||||
else:
|
||||
for d in displayables:
|
||||
add d
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This contains code to choose between OpenGL and Software rendering, when
|
||||
# a system supports both.
|
||||
|
||||
init -1024:
|
||||
|
||||
python hide:
|
||||
import os
|
||||
store.__dxwebsetup = os.path.join(config.renpy_base, "lib", "dxwebsetup.exe")
|
||||
|
||||
python:
|
||||
class _SetRenderer(Action):
|
||||
"""
|
||||
Sets the preferred renderer to one of "auto", "angle", "gl", or
|
||||
"sw".
|
||||
"""
|
||||
|
||||
def __init__(self, renderer):
|
||||
self.renderer = renderer
|
||||
|
||||
def __call__(self):
|
||||
_preferences.renderer = self.renderer
|
||||
renpy.restart_interaction()
|
||||
|
||||
def get_selected(self):
|
||||
return _preferences.renderer == self.renderer
|
||||
|
||||
# This is displayed to ask the user to choose the renderer he or she
|
||||
# wants to use. It takes no parameters, doesn't return anything, and
|
||||
# is expected to call _SetRenderer actions and quit when done.
|
||||
#
|
||||
# This screen can be customized by the creator, provided the actions
|
||||
# remain available.
|
||||
screen _choose_renderer:
|
||||
|
||||
frame:
|
||||
style_group ""
|
||||
|
||||
xalign .5
|
||||
yalign .33
|
||||
xpadding 20
|
||||
ypadding 20
|
||||
|
||||
xmaximum 400
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Graphics Acceleration")
|
||||
|
||||
null height 10
|
||||
|
||||
textbutton _("Automatically Choose"):
|
||||
action _SetRenderer("auto")
|
||||
xfill True
|
||||
|
||||
if renpy.renpy.windows:
|
||||
textbutton _("Force Angle/DirectX Renderer"):
|
||||
action _SetRenderer("angle")
|
||||
xfill True
|
||||
|
||||
textbutton _("Force OpenGL Renderer"):
|
||||
action _SetRenderer("gl")
|
||||
xfill True
|
||||
|
||||
textbutton _("Force Software Renderer"):
|
||||
action _SetRenderer("sw")
|
||||
xfill True
|
||||
|
||||
null height 10
|
||||
|
||||
text _("Changes will take effect the next time this program is run.") substitute True
|
||||
|
||||
null height 10
|
||||
|
||||
textbutton _(u"Quit"):
|
||||
action Quit(confirm=False)
|
||||
xfill True
|
||||
|
||||
if not renpy.display.interface.safe_mode:
|
||||
textbutton _("Return"):
|
||||
action Return(0)
|
||||
xfill True
|
||||
|
||||
|
||||
# This is displayed when a display performance problem occurs.
|
||||
#
|
||||
# `problem` is the kind of problem that is occuring. It can be:
|
||||
# - "sw" if the software renderer was selected.
|
||||
# - "slow" if the performance test failed.
|
||||
# - "fixed" if we're operating w/o shaders.
|
||||
# - other things, added in the future.
|
||||
#
|
||||
# `url` is the url of a web page on renpy.org that will include
|
||||
# info on troubleshooting display problems.
|
||||
screen _performance_warning:
|
||||
|
||||
frame:
|
||||
style_group ""
|
||||
|
||||
xalign .5
|
||||
yalign .33
|
||||
|
||||
xpadding 20
|
||||
ypadding 20
|
||||
|
||||
xmaximum 400
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Performance Warning")
|
||||
|
||||
null height 10
|
||||
|
||||
if problem == "sw":
|
||||
text _("This computer is using software rendering.")
|
||||
elif problem == "fixed":
|
||||
text _("This computer is not using shaders.")
|
||||
elif problem == "slow":
|
||||
text _("This computer is displaying graphics slowly.")
|
||||
else:
|
||||
text _("This computer has a problem displaying graphics: [problem].") substitute True
|
||||
|
||||
null height 10
|
||||
|
||||
if directx_update:
|
||||
text _("Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display. Updating DirectX could fix this problem.")
|
||||
else:
|
||||
text _("Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display.")
|
||||
|
||||
if directx_update:
|
||||
null height 10
|
||||
|
||||
textbutton _("Update DirectX"):
|
||||
action directx_update
|
||||
xfill True
|
||||
|
||||
null height 10
|
||||
|
||||
textbutton _("Continue, Show this warning again"):
|
||||
action Return(True)
|
||||
xfill True
|
||||
|
||||
textbutton _("Continue, Don't show warning again"):
|
||||
action Return(False)
|
||||
xfill True
|
||||
|
||||
null height 10
|
||||
|
||||
textbutton _("Quit"):
|
||||
action Quit(confirm=False)
|
||||
xfill True
|
||||
|
||||
# Used while a directx update is ongoing.
|
||||
screen _directx_update:
|
||||
|
||||
frame:
|
||||
style_group ""
|
||||
|
||||
xalign .5
|
||||
yalign .33
|
||||
|
||||
xpadding 20
|
||||
ypadding 20
|
||||
|
||||
xmaximum 400
|
||||
|
||||
has vbox
|
||||
|
||||
label _("Updating DirectX.")
|
||||
|
||||
null height 10
|
||||
|
||||
text _("DirectX web setup has been started. It may start minimized in the taskbar. Please follow the prompts to install DirectX.")
|
||||
|
||||
null height 10
|
||||
|
||||
text _("{b}Note:{/b} Microsoft's DirectX web setup program will, by default, install the Bing toolbar. If you do not want this toolbar, uncheck the appropriate box.")
|
||||
|
||||
null height 10
|
||||
|
||||
text _("When setup finishes, please click below to restart this program.")
|
||||
|
||||
textbutton _("Restart") action Return(True)
|
||||
|
||||
|
||||
|
||||
init -1024 python:
|
||||
# The image that we fill the screen with in GL-test mode.
|
||||
config.gl_test_image = "black"
|
||||
|
||||
class __GLTest(renpy.Displayable):
|
||||
"""
|
||||
This counts the number of times it's been rendered, and
|
||||
the number of seconds it's been displayed, and uses them
|
||||
to make the decisions as to if OpenGL is working or not.
|
||||
"""
|
||||
|
||||
def __init__(self, frames, fps, timeout):
|
||||
super(__GLTest, self).__init__()
|
||||
|
||||
self.target = 1.0 * frames / fps
|
||||
self.frames = frames
|
||||
self.timeout = timeout
|
||||
|
||||
self.times = [ ]
|
||||
self.success = False
|
||||
|
||||
renpy.renpy.display.log.write("- Target is {0} frames in {1} seconds.".format(frames, self.target))
|
||||
|
||||
def render(self, width, height, st, at):
|
||||
rv = renpy.Render(width, height)
|
||||
|
||||
if self.success:
|
||||
return rv
|
||||
|
||||
self.times.append(st)
|
||||
|
||||
renpy.redraw(self, 0)
|
||||
|
||||
renpy.renpy.display.log.write("- Frame drawn at %f seconds." % st)
|
||||
|
||||
if len(self.times) >= self.frames:
|
||||
frames_timing = self.times[-1] - self.times[-self.frames]
|
||||
|
||||
renpy.renpy.display.log.write("- %f seconds to render %d frames.", frames_timing, self.frames)
|
||||
|
||||
if frames_timing <= self.target:
|
||||
self.success = True
|
||||
renpy.timeout(0)
|
||||
|
||||
return rv
|
||||
|
||||
def event(self, ev, x, y, st):
|
||||
|
||||
if self.success:
|
||||
return True
|
||||
|
||||
if st > self.timeout:
|
||||
return False
|
||||
|
||||
renpy.timeout(self.timeout - st)
|
||||
|
||||
config.performance_test = True
|
||||
|
||||
def __gl_test():
|
||||
|
||||
import os
|
||||
|
||||
# If we've entered safe mode, display the renderer choice screen.
|
||||
# This screen will cause us to quit.
|
||||
|
||||
if _restart:
|
||||
return
|
||||
|
||||
if not config.gl_enable:
|
||||
return
|
||||
|
||||
if renpy.display.interface.safe_mode:
|
||||
renpy.call_in_new_context("_choose_renderer")
|
||||
|
||||
if not config.performance_test:
|
||||
return
|
||||
|
||||
_gl_performance_test()
|
||||
|
||||
def _gl_performance_test():
|
||||
|
||||
import os
|
||||
|
||||
if not _preferences.performance_test and "RENPY_PERFORMANCE_TEST" not in os.environ:
|
||||
return
|
||||
|
||||
# Don't bother on androuid - there's nothing the user can do.
|
||||
if renpy.renpy.android:
|
||||
return
|
||||
|
||||
renpy.renpy.display.log.write("Performance test:")
|
||||
|
||||
# This will cause the screen to start displaying.
|
||||
ui.pausebehavior(0)
|
||||
ui.interact(suppress_underlay=True, suppress_overlay=True)
|
||||
|
||||
# The problem we have.
|
||||
problem = None
|
||||
|
||||
renderer_info = renpy.get_renderer_info()
|
||||
|
||||
# Software renderer check.
|
||||
if config.renderer != "sw" and renderer_info["renderer"] == "sw":
|
||||
problem = "sw"
|
||||
|
||||
# Speed check.
|
||||
if problem is None:
|
||||
|
||||
# The parameters of the performance test. If we do not hit FPS fps
|
||||
# over FRAMES frames before DELAY seconds are up, we fail.
|
||||
FRAMES = 5
|
||||
FPS = 15
|
||||
DELAY = 1.5
|
||||
|
||||
renpy.transition(Dissolve(DELAY), always=True, force=True)
|
||||
ui.add(__GLTest(FRAMES, FPS, DELAY))
|
||||
result = ui.interact(suppress_overlay=True, suppress_underlay=True)
|
||||
|
||||
if not result:
|
||||
problem = "slow"
|
||||
|
||||
# Lack of shaders check.
|
||||
if problem is None:
|
||||
if not "RENPY_GL_ENVIRON" in os.environ:
|
||||
if renderer_info["renderer"] == "gl" and renderer_info["environ"] == "fixed":
|
||||
problem = "fixed"
|
||||
|
||||
if problem is None:
|
||||
return
|
||||
|
||||
if renpy.renpy.windows and os.path.exists(__dxwebsetup):
|
||||
directx_update = Jump("_directx_update")
|
||||
else:
|
||||
directx_update = None
|
||||
|
||||
# Give the warning message to the user.
|
||||
renpy.show_screen("_performance_warning", problem=problem, directx_update=directx_update, _transient=True)
|
||||
result = ui.interact(suppress_overlay=True, suppress_underlay=True)
|
||||
|
||||
|
||||
# Store the user's choice, and continue.
|
||||
_preferences.performance_test = result
|
||||
return
|
||||
|
||||
|
||||
label _gl_test:
|
||||
|
||||
# Show the test image.
|
||||
scene
|
||||
show expression config.gl_test_image
|
||||
|
||||
$ __gl_test()
|
||||
|
||||
# Hide the test image.
|
||||
scene
|
||||
|
||||
return
|
||||
|
||||
# We can assume we're on windows here. We're also always restart once we
|
||||
# make it here.
|
||||
label _directx_update:
|
||||
|
||||
if renpy.has_label("directx_update"):
|
||||
jump expression "directx_update"
|
||||
|
||||
label _directx_update_main:
|
||||
|
||||
python hide:
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# Start dxsetup. We have to go through start to ensure that UAC
|
||||
# doesn't cause problems.
|
||||
subprocess.Popen(["start", __dxwebsetup], shell=True)
|
||||
|
||||
renpy.show_screen("_directx_update")
|
||||
ui.interact(suppress_overlay=True, suppress_underlay=True)
|
||||
|
||||
# Restart the current program.
|
||||
subprocess.Popen(sys.argv)
|
||||
renpy.quit()
|
||||
|
||||
label _choose_renderer:
|
||||
scene expression "#000"
|
||||
|
||||
$ renpy.call_screen("_choose_renderer")
|
||||
return
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Copyright 2004-2007 PyTom
|
||||
#
|
||||
# Please see the LICENSE.txt distributed with Ren'Py for permission to
|
||||
# copy and modify.
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1105 python:
|
||||
|
||||
@@ -16,17 +14,6 @@ init -1105 python:
|
||||
layout.compat_funcs = [ ]
|
||||
layout.provided = set()
|
||||
|
||||
# This takes care of actually displaying button menus.
|
||||
def _display_button_menu(menuitems):
|
||||
|
||||
narration = [ s for s, i in menuitems if i is None and s ]
|
||||
menuitems = [ (s, i) for s, i in menuitems if i is not None or not s ]
|
||||
|
||||
if narration:
|
||||
renpy.say(None, "\n".join(narration), interact=False)
|
||||
|
||||
return renpy.display_menu(menuitems)
|
||||
|
||||
init -1105 python hide:
|
||||
|
||||
# Called to indicate that the given kind of layout has been
|
||||
@@ -58,6 +45,21 @@ init -1105 python hide:
|
||||
joystick_preferences=layout.classic_joystick_preferences,
|
||||
)
|
||||
|
||||
if renpy.has_screen("main_menu"):
|
||||
defaults["main_menu"] = layout.screen_main_menu
|
||||
|
||||
if renpy.has_screen("load") and renpy.has_screen("save"):
|
||||
defaults["load_save"] = layout.screen_load_save
|
||||
|
||||
if renpy.has_screen("yesno_prompt"):
|
||||
defaults["yesno_prompt"] = layout.screen_yesno_prompt
|
||||
|
||||
if renpy.has_screen("preferences"):
|
||||
defaults["preferences"] = layout.screen_preferences
|
||||
|
||||
if renpy.has_screen("joystick_preferences"):
|
||||
defaults["joystick_preferences"] = layout.screen_joystick_preferences
|
||||
|
||||
for k, v in defaults.iteritems():
|
||||
if k not in layout.provided:
|
||||
v()
|
||||
@@ -198,7 +200,7 @@ init -1105 python hide:
|
||||
@layout
|
||||
def button_menu():
|
||||
|
||||
store.menu = _display_button_menu
|
||||
config.narrator_menu = True
|
||||
|
||||
style.menu.box_spacing = 2
|
||||
style.menu_window.set_parent(style.default)
|
||||
@@ -288,13 +290,14 @@ init -1105 python hide:
|
||||
|
||||
|
||||
@layout
|
||||
def imagemap_main_menu(ground, selected, hotspots):
|
||||
def imagemap_main_menu(ground, selected, hotspots, idle=None, variant=None):
|
||||
renpy.load_module("_layout/imagemap_main_menu")
|
||||
|
||||
config.main_menu_ground = ground
|
||||
config.main_menu_selected = selected
|
||||
config.main_menu_hotspots = hotspots
|
||||
|
||||
config.main_menu_ground[variant] = ground
|
||||
config.main_menu_selected[variant] = selected
|
||||
config.main_menu_hotspots[variant] = hotspots
|
||||
config.main_menu_idle[variant] = idle
|
||||
|
||||
@layout
|
||||
def imagemap_navigation(ground, idle, hover, selected_idle, selected_hover,
|
||||
hotspots):
|
||||
@@ -322,7 +325,7 @@ init -1105 python hide:
|
||||
config.preferences_hotspots = hotspots
|
||||
|
||||
@layout
|
||||
def imagemap_yesno_prompt(ground, idle, hover, hotspots):
|
||||
def imagemap_yesno_prompt(ground, idle, hover, hotspots, prompt_images={ }):
|
||||
|
||||
renpy.load_module("_layout/imagemap_yesno_prompt")
|
||||
|
||||
@@ -330,16 +333,102 @@ init -1105 python hide:
|
||||
config.yesno_prompt_idle = idle
|
||||
config.yesno_prompt_hover = hover
|
||||
config.yesno_prompt_hotspots = hotspots
|
||||
config.yesno_prompt_message_images = prompt_images
|
||||
|
||||
@layout
|
||||
def imagemap_load_save(ground, idle, hover, selected_idle, selected_hover,
|
||||
hotspots):
|
||||
hotspots, variant=None):
|
||||
|
||||
renpy.load_module("_layout/imagemap_load_save")
|
||||
|
||||
config.load_save_ground = ground
|
||||
config.load_save_idle = idle
|
||||
config.load_save_hover = hover
|
||||
config.load_save_selected_idle = selected_idle
|
||||
config.load_save_selected_hover = selected_hover
|
||||
config.load_save_hotspots = hotspots
|
||||
config.load_save_ground[variant] = ground
|
||||
config.load_save_idle[variant] = idle
|
||||
config.load_save_hover[variant] = hover
|
||||
config.load_save_selected_idle[variant] = selected_idle
|
||||
config.load_save_selected_hover[variant] = selected_hover
|
||||
config.load_save_hotspots[variant] = hotspots
|
||||
|
||||
@layout
|
||||
def screen_main_menu():
|
||||
renpy.load_module("_layout/screen_main_menu")
|
||||
|
||||
@layout
|
||||
def screen_load_save():
|
||||
renpy.load_module("_layout/screen_load_save")
|
||||
|
||||
@layout
|
||||
def screen_preferences():
|
||||
renpy.load_module("_layout/screen_preferences")
|
||||
|
||||
@layout
|
||||
def screen_joystick_preferences():
|
||||
renpy.load_module("_layout/screen_joystick_preferences")
|
||||
|
||||
@layout
|
||||
def screen_yesno_prompt():
|
||||
renpy.load_module("_layout/screen_yesno_prompt")
|
||||
|
||||
layout.ARE_YOU_SURE = u"Are you sure?"
|
||||
layout.DELETE_SAVE = u"Are you sure you want to delete this save?"
|
||||
layout.OVERWRITE_SAVE = u"Are you sure you want to overwrite your save?"
|
||||
layout.LOADING = u"Loading will lose unsaved progress.\nAre you sure you want to do this?"
|
||||
layout.QUIT = u"Are you sure you want to quit?"
|
||||
layout.MAIN_MENU = u"Are you sure you want to return to the main menu?\nThis will lose unsaved progress."
|
||||
|
||||
@layout
|
||||
def invoke_yesno_prompt(*args):
|
||||
_enter_menu()
|
||||
return layout.yesno_prompt(*args)
|
||||
|
||||
@layout
|
||||
def yesno_screen(message, yes=None, no=None):
|
||||
"""
|
||||
:doc: other
|
||||
|
||||
This causes the a yes/no prompt screen with the given message
|
||||
to be displayed. The screen will be hidden when the user hits
|
||||
yes or no.
|
||||
|
||||
`message`
|
||||
The message that will be displayed.
|
||||
|
||||
`yes`
|
||||
An action that is run when the user chooses yes.
|
||||
|
||||
`no`
|
||||
An action that is run when the user chooses no.
|
||||
"""
|
||||
|
||||
if renpy.has_screen("yesno_prompt"):
|
||||
|
||||
yes_action = [ Hide("yesno_prompt") ]
|
||||
no_action = [ Hide("yesno_prompt") ]
|
||||
|
||||
if yes is not None:
|
||||
yes_action.append(yes)
|
||||
if no is not None:
|
||||
no_action.append(no)
|
||||
|
||||
renpy.show_screen(
|
||||
"yesno_prompt",
|
||||
message=message,
|
||||
yes_action=yes_action,
|
||||
no_action=no_action)
|
||||
|
||||
renpy.restart_interaction()
|
||||
|
||||
return
|
||||
|
||||
if renpy.invoke_in_new_context(layout.invoke_yesno_prompt, None, message):
|
||||
if yes is not None:
|
||||
yes()
|
||||
else:
|
||||
if no is not None:
|
||||
no()
|
||||
|
||||
|
||||
def __auto_save_extra_info():
|
||||
return save_name
|
||||
|
||||
config.auto_save_extra_info = __auto_save_extra_info
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Copyright 2004-2007 PyTom
|
||||
#
|
||||
# Please see the LICENSE.txt distributed with Ren'Py for permission to
|
||||
# copy and modify.
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file consists of renpy functions that aren't expected to be
|
||||
# touched by the user too much. We reserve the _ prefix for names
|
||||
@@ -49,6 +47,31 @@ init -1180 python:
|
||||
# preference when the game is first run.
|
||||
config.default_text_cps = None
|
||||
|
||||
# If not None, the default value of afm_time
|
||||
config.default_afm_time = None
|
||||
|
||||
# If not None, the default value of afm_enable
|
||||
config.default_afm_enable = None
|
||||
|
||||
# Should we automatically define images?
|
||||
config.automatic_images = None
|
||||
|
||||
# Prefixes to strip from automatic images.
|
||||
config.automatic_images_strip = [ ]
|
||||
|
||||
# A save to automatically load, if it exists.
|
||||
config.auto_load = None
|
||||
|
||||
# Layers to clear when entering the menus.
|
||||
config.menu_clear_layers = [ ]
|
||||
|
||||
# Should we start the game with scene black or just scene?
|
||||
config.start_scene_black = False
|
||||
|
||||
# Voice and Sound samples.
|
||||
config.sample_sound = None
|
||||
config.sample_voice = None
|
||||
|
||||
# This is updated to give the user an idea of where a save is
|
||||
# taking place.
|
||||
save_name = ''
|
||||
@@ -69,6 +92,24 @@ init -1180 python:
|
||||
|
||||
config.with_callback = _default_with_callback
|
||||
|
||||
|
||||
def _default_empty_window():
|
||||
|
||||
who = _last_say_who
|
||||
|
||||
if who is not None:
|
||||
who = eval(who)
|
||||
|
||||
if who is None:
|
||||
who = narrator
|
||||
|
||||
if isinstance(who, NVLCharacter):
|
||||
nvl_show_core()
|
||||
else:
|
||||
store.narrator("", interact=False)
|
||||
|
||||
config.empty_window = _default_empty_window
|
||||
|
||||
style.skip_indicator = Style(style.default, heavy=True, help='The skip indicator.')
|
||||
style.skip_indicator.xpos = 10
|
||||
style.skip_indicator.ypos = 10
|
||||
@@ -80,7 +121,6 @@ init -1180 python:
|
||||
|
||||
_intra_jumps = renpy.curry(_intra_jumps_core)
|
||||
|
||||
|
||||
# The function that's used to translate strings in the game menu.
|
||||
def _(s):
|
||||
"""
|
||||
@@ -95,11 +135,33 @@ init -1180 python:
|
||||
|
||||
return s
|
||||
|
||||
config.extend_interjection = "{fast}"
|
||||
|
||||
def extend(what, interact=True):
|
||||
who = _last_say_who
|
||||
|
||||
if who is not None:
|
||||
who = eval(who)
|
||||
|
||||
if who is None:
|
||||
who = narrator
|
||||
|
||||
if isinstance(who, basestring):
|
||||
who = unknown.copy(who)
|
||||
|
||||
# This ensures extend works even with NVL mode.
|
||||
who.do_extend()
|
||||
|
||||
what = _last_say_what + config.extend_interjection + what
|
||||
|
||||
renpy.exports.say(who, what, interact=interact)
|
||||
store._last_say_what = what
|
||||
|
||||
extend.record_say = False
|
||||
|
||||
# Are the windows currently hidden?
|
||||
_windows_hidden = False
|
||||
|
||||
init -1180 python:
|
||||
|
||||
def toggle_skipping():
|
||||
|
||||
if not config.skipping:
|
||||
@@ -111,31 +173,93 @@ init -1180 python:
|
||||
renpy.jump("_noisy_return")
|
||||
else:
|
||||
renpy.restart_interaction()
|
||||
|
||||
init -1180 python hide:
|
||||
|
||||
config.help = None
|
||||
|
||||
def _help(help=None):
|
||||
|
||||
if help is None:
|
||||
help = config.help
|
||||
|
||||
if help is None:
|
||||
return
|
||||
|
||||
if renpy.has_label(help):
|
||||
renpy.call_in_new_context(help)
|
||||
return
|
||||
|
||||
_preferences.fullscreen = False
|
||||
|
||||
try:
|
||||
import webbrowser
|
||||
webbrowser.open_new("file:///" + config.basedir + "/" + help)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
# Called to make a screenshot happen.
|
||||
def screenshot():
|
||||
def _screenshot():
|
||||
import os.path
|
||||
import os
|
||||
import __main__
|
||||
|
||||
pattern = os.environ.get("RENPY_SCREENSHOT_PATTERN", "screenshot%04d.png")
|
||||
|
||||
# Pick the directory to save into.
|
||||
dest = config.renpy_base.rstrip("/")
|
||||
|
||||
# Guess if we're an OSX App.
|
||||
if dest.endswith("/Contents/Resources/autorun"):
|
||||
# Go up 4 directories.
|
||||
dest = os.path.dirname(dest)
|
||||
dest = os.path.dirname(dest)
|
||||
dest = os.path.dirname(dest)
|
||||
dest = os.path.dirname(dest)
|
||||
|
||||
# Try to pick a filename.
|
||||
i = 1
|
||||
while True:
|
||||
fn = "screenshot%04d.png" % i
|
||||
fn = dest + "/" + pattern % i
|
||||
if not os.path.exists(fn):
|
||||
break
|
||||
i += 1
|
||||
|
||||
renpy.screenshot(fn)
|
||||
try:
|
||||
renpy.screenshot(fn)
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
if config.screenshot_callback is not None:
|
||||
config.screenshot_callback(fn)
|
||||
|
||||
def _screenshot_callback(fn):
|
||||
renpy.notify(_("Saved screenshot as %s.") % fn)
|
||||
|
||||
config.screenshot_callback = _screenshot_callback
|
||||
|
||||
_predict_screens = [ ]
|
||||
|
||||
init -1180 python hide:
|
||||
|
||||
def dump_styles():
|
||||
if config.developer:
|
||||
renpy.style.write_text("styles.txt")
|
||||
|
||||
# This is run when entering the game menu.
|
||||
config.game_menu_action = None
|
||||
|
||||
def invoke_game_menu():
|
||||
if renpy.context()._menu:
|
||||
renpy.jump("_noisy_return")
|
||||
if renpy.context()._main_menu:
|
||||
return
|
||||
else:
|
||||
renpy.jump("_noisy_return")
|
||||
else:
|
||||
renpy.call_in_new_context('_game_menu')
|
||||
if config.game_menu_action:
|
||||
renpy.display.behavior.run(config.game_menu_action)
|
||||
else:
|
||||
renpy.call_in_new_context('_game_menu')
|
||||
|
||||
def keymap_toggle_skipping():
|
||||
if renpy.context()._menu:
|
||||
@@ -143,7 +267,6 @@ init -1180 python hide:
|
||||
|
||||
toggle_skipping()
|
||||
|
||||
|
||||
def fast_skip():
|
||||
if config.fast_skipping or config.developer:
|
||||
config.skipping = "fast"
|
||||
@@ -163,11 +286,12 @@ init -1180 python hide:
|
||||
|
||||
filename, line = renpy.get_filename_line()
|
||||
renpy.launch_editor([ filename ], line)
|
||||
|
||||
# The default keymap.
|
||||
|
||||
# The default keymap. We might also want to put some of this into
|
||||
# the launcher.
|
||||
km = renpy.Keymap(
|
||||
rollback = renpy.rollback,
|
||||
screenshot = screenshot,
|
||||
screenshot = _screenshot,
|
||||
toggle_fullscreen = renpy.toggle_fullscreen,
|
||||
toggle_music = renpy.toggle_music,
|
||||
toggle_skip = keymap_toggle_skipping,
|
||||
@@ -178,6 +302,10 @@ init -1180 python hide:
|
||||
dump_styles = dump_styles,
|
||||
reload_game = reload_game,
|
||||
developer = renpy.curried_call_in_new_context("_developer"),
|
||||
quit = renpy.quit_event,
|
||||
iconify = renpy.iconify,
|
||||
help = _help,
|
||||
choose_renderer = renpy.curried_call_in_new_context("_choose_renderer"),
|
||||
)
|
||||
|
||||
config.underlay = [ km ]
|
||||
@@ -207,7 +335,7 @@ init -1180 python hide:
|
||||
|
||||
config.overlay_functions.append(skip_indicator)
|
||||
|
||||
|
||||
# Hyperlink functions. Duplicated in _errorhandling.rpym.
|
||||
def hyperlink_styler(target):
|
||||
return style.hyperlink_text
|
||||
|
||||
@@ -221,34 +349,43 @@ init -1180 python hide:
|
||||
else:
|
||||
renpy.call_in_new_context(target)
|
||||
|
||||
config.hyperlink_styler = hyperlink_styler
|
||||
config.hyperlink_callback = hyperlink_function
|
||||
style.default.hyperlink_functions = (hyperlink_styler, hyperlink_function, None)
|
||||
|
||||
# Prediction of screens.
|
||||
def predict():
|
||||
|
||||
for s in _predict_screens:
|
||||
if renpy.has_screen(s):
|
||||
renpy.predict_screen(s)
|
||||
|
||||
s = _game_menu_screen
|
||||
|
||||
if s is None:
|
||||
return
|
||||
|
||||
if renpy.has_screen(s):
|
||||
renpy.predict_screen(s)
|
||||
return
|
||||
|
||||
if s.endswith("_screen"):
|
||||
s = s[:-7]
|
||||
if renpy.has_screen(s):
|
||||
renpy.predict_screen(s)
|
||||
return
|
||||
|
||||
|
||||
config.predict_callbacks.append(predict)
|
||||
|
||||
def imagemap_auto_function(auto_param, variant):
|
||||
rv = auto_param % variant
|
||||
|
||||
if renpy.loadable(rv):
|
||||
return rv
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
config.extend_interjection = "{fast}"
|
||||
|
||||
init -1180 python:
|
||||
def extend(what, interact=True):
|
||||
who = _last_say_who
|
||||
|
||||
if who is not None:
|
||||
who = eval(who)
|
||||
|
||||
if who is None:
|
||||
who = narrator
|
||||
|
||||
if isinstance(who, basestring):
|
||||
who = unknown.copy(who)
|
||||
|
||||
# This ensures extend works even with NVL mode.
|
||||
who.do_extend()
|
||||
|
||||
what = _last_say_what + config.extend_interjection + what
|
||||
|
||||
renpy.exports.say(who, what, interact=interact)
|
||||
store._last_say_what = what
|
||||
|
||||
extend.record_say = False
|
||||
config.imagemap_auto_function = imagemap_auto_function
|
||||
|
||||
|
||||
label _hide_windows:
|
||||
@@ -262,45 +399,26 @@ label _hide_windows:
|
||||
python:
|
||||
_windows_hidden = True
|
||||
ui.saybehavior(dismiss=['dismiss', 'hide_windows'])
|
||||
ui.interact(suppress_overlay=True)
|
||||
ui.interact(suppress_overlay=True, suppress_window=True)
|
||||
_windows_hidden = False
|
||||
|
||||
return
|
||||
|
||||
|
||||
# This code here handles check for the correct version of the Ren'Py module.
|
||||
|
||||
label _check_module:
|
||||
|
||||
if not config.module_warning:
|
||||
return
|
||||
|
||||
python hide:
|
||||
module_info = _(u"While Ren'Py games may be playable without the renpy module, some features may be disabled. For more information, read the module/README.txt file or go to http://www.bishoujo.us/renpy/.")
|
||||
|
||||
if renpy.module_version() == 0:
|
||||
_show_exception(_(u"renpy module not found."),
|
||||
_(u"The renpy module could not be loaded on your system.") + "\n\n" + module_info)
|
||||
elif renpy.module_version() < config.module_version:
|
||||
_show_exception(_(u"Old renpy module found."),
|
||||
_(u"An old version (%d) of the Ren'Py module was found on your system, while this game requires version %d.") % (renpy.module_version(), config.module_version) + "\n\n" + module_info)
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
label _save_reload_game:
|
||||
python hide:
|
||||
renpy.take_screenshot((config.thumbnail_width, config.thumbnail_height))
|
||||
|
||||
renpy.music.stop()
|
||||
|
||||
ui.add(Solid((0, 0, 0, 255)))
|
||||
ui.text("Saving game...",
|
||||
size=32, xalign=0.5, yalign=0.5, color=(255, 255, 255, 255))
|
||||
|
||||
renpy.pause(0)
|
||||
renpy.save("reload", "reload save game")
|
||||
|
||||
persistent._reload_save = "reload"
|
||||
renpy.save("_reload-1", "reload save game")
|
||||
|
||||
ui.add(Solid((0, 0, 0, 255)))
|
||||
ui.text("Reloading script...",
|
||||
@@ -311,13 +429,12 @@ label _save_reload_game:
|
||||
renpy.utter_restart()
|
||||
|
||||
label _load_reload_game:
|
||||
|
||||
if not persistent._reload_save:
|
||||
return
|
||||
|
||||
if not renpy.can_load("_reload-1"):
|
||||
return
|
||||
|
||||
python hide:
|
||||
save = persistent._reload_save
|
||||
persistent._reload_save = 0
|
||||
renpy.rename_save("_reload-1", "_reload-2")
|
||||
|
||||
ui.add(Solid((0, 0, 0, 255)))
|
||||
ui.text("Reloading game...",
|
||||
@@ -326,7 +443,7 @@ label _load_reload_game:
|
||||
ui.pausebehavior(0)
|
||||
ui.interact(suppress_underlay=True, suppress_overlay=True)
|
||||
|
||||
renpy.load(save)
|
||||
renpy.load("_reload-2")
|
||||
|
||||
return
|
||||
|
||||
@@ -349,48 +466,17 @@ init 1180 python:
|
||||
if config.default_text_cps is not None:
|
||||
_preferences.text_cps = config.default_text_cps
|
||||
|
||||
if config.developer:
|
||||
|
||||
def _inspector(l):
|
||||
|
||||
ui.add("#000")
|
||||
ui.window(xmargin=20, ymargin=20, style='default')
|
||||
ui.vbox()
|
||||
|
||||
ui.text("Style Inspector")
|
||||
ui.text("")
|
||||
|
||||
|
||||
if not l:
|
||||
ui.text("Nothing to inspect.")
|
||||
if config.default_afm_time is not None:
|
||||
_preferences.afm_time = config.default_afm_time
|
||||
|
||||
for depth, width, height, d in l:
|
||||
if config.default_afm_enable is not None:
|
||||
_preferences.afm_enable = config.default_afm_enable
|
||||
_preferences.using_afm_enable = True
|
||||
else:
|
||||
_preferences.afm_enable = True
|
||||
_preferences.using_afm_enable = False
|
||||
|
||||
|
||||
s = d.style
|
||||
|
||||
while s:
|
||||
if s.name:
|
||||
break
|
||||
|
||||
if s.parent:
|
||||
s = style.get(s.parent)
|
||||
else:
|
||||
break
|
||||
|
||||
name = s.name[0] + "".join([ "[%r]" % i for i in s.name[1:] ])
|
||||
|
||||
ui.text(" " * depth + u" \u2022 " + d.__class__.__name__ + " : " + name + " (%dx%d)" % (width, height))
|
||||
|
||||
ui.text("")
|
||||
ui.text("(click to continue)")
|
||||
|
||||
ui.close()
|
||||
ui.saybehavior()
|
||||
ui.interact(suppress_overlay=True, suppress_underlay=True)
|
||||
|
||||
return
|
||||
|
||||
config.inspector = _inspector
|
||||
|
||||
##############################################################################
|
||||
# Code that originated in 00gamemenu.rpy
|
||||
@@ -475,6 +561,29 @@ init -1180 python:
|
||||
|
||||
ui.interact()
|
||||
|
||||
def _enter_menu():
|
||||
renpy.movie_stop(only_fullscreen=True)
|
||||
renpy.take_screenshot((config.thumbnail_width, config.thumbnail_height))
|
||||
|
||||
for i in config.menu_clear_layers:
|
||||
renpy.scene(layer=i)
|
||||
|
||||
renpy.context()._menu = True
|
||||
renpy.context()._main_menu = False
|
||||
renpy.context_dynamic("main_menu")
|
||||
renpy.context_dynamic("_window_subtitle")
|
||||
renpy.context_dynamic("_window")
|
||||
|
||||
store.main_menu = False
|
||||
store._window_subtitle = config.menu_window_subtitle
|
||||
store._window = False
|
||||
|
||||
store.mouse_visible = True
|
||||
store.suppress_overlay = True
|
||||
ui.clear()
|
||||
|
||||
for i in config.clear_layers:
|
||||
renpy.scene(layer=i)
|
||||
|
||||
# Run at the end of init, to set up autosaving based on the user's
|
||||
# choices.
|
||||
@@ -484,34 +593,10 @@ init 1180 python:
|
||||
config.autosave_slots = 10
|
||||
else:
|
||||
config.autosave_frequency = None
|
||||
|
||||
label _enter_menu:
|
||||
python hide:
|
||||
renpy.movie_stop()
|
||||
renpy.take_screenshot((config.thumbnail_width, config.thumbnail_height))
|
||||
|
||||
renpy.context()._menu = True
|
||||
|
||||
# This may be changed, if we are already in the main menu.
|
||||
renpy.context().main_menu = False
|
||||
renpy.context_dynamic("main_menu")
|
||||
renpy.context_dynamic("_window_subtitle")
|
||||
|
||||
store.main_menu = False
|
||||
store._window_subtitle = config.menu_window_subtitle
|
||||
|
||||
store.mouse_visible = True
|
||||
store.suppress_overlay = True
|
||||
ui.clear()
|
||||
|
||||
for i in config.clear_layers:
|
||||
renpy.scene(layer=i)
|
||||
|
||||
return
|
||||
|
||||
# Factored this all into one place, to make our lives a bit easier.
|
||||
label _enter_game_menu:
|
||||
call _enter_menu from _call__enter_menu_2
|
||||
$ _enter_menu()
|
||||
|
||||
$ renpy.transition(config.enter_transition)
|
||||
|
||||
@@ -531,9 +616,14 @@ label _game_menu(_game_menu_screen=_game_menu_screen):
|
||||
$ renpy.play(config.enter_sound)
|
||||
|
||||
call _enter_game_menu from _call__enter_game_menu_0
|
||||
|
||||
|
||||
if renpy.has_label("game_menu"):
|
||||
jump expression "game_menu"
|
||||
|
||||
if renpy.has_screen(_game_menu_screen):
|
||||
$ renpy.show_screen(_game_menu_screen)
|
||||
$ ui.interact()
|
||||
jump _noisy_return
|
||||
|
||||
jump expression _game_menu_screen
|
||||
|
||||
@@ -575,16 +665,15 @@ label _noisy_return:
|
||||
# Return to the game.
|
||||
label _return:
|
||||
|
||||
if renpy.context().main_menu:
|
||||
if renpy.context()._main_menu:
|
||||
$ renpy.transition(config.game_main_transition)
|
||||
jump _main_menu
|
||||
jump _main_menu_screen
|
||||
|
||||
$ renpy.transition(config.exit_transition)
|
||||
|
||||
return
|
||||
|
||||
label _confirm_quit:
|
||||
call _enter_menu from _call__enter_menu_3
|
||||
|
||||
if renpy.has_label("confirm_quit"):
|
||||
jump expression "confirm_quit"
|
||||
@@ -610,6 +699,7 @@ init -1180 python hide:
|
||||
# after_load.
|
||||
label _after_load:
|
||||
$ renpy.context()._menu = False
|
||||
$ renpy.context()._main_menu = False
|
||||
|
||||
if config.after_load_transition:
|
||||
$ renpy.transition(config.after_load_transition, force=True)
|
||||
@@ -626,15 +716,25 @@ label _start:
|
||||
|
||||
python hide:
|
||||
renpy.context()._menu = False
|
||||
renpy.context()._main_menu = False
|
||||
|
||||
for i in config.start_callbacks:
|
||||
i()
|
||||
|
||||
call _check_module from _call__check_module_1
|
||||
|
||||
$ renpy.block_rollback()
|
||||
|
||||
call _gl_test
|
||||
|
||||
call _load_reload_game from _call__load_reload_game_1
|
||||
|
||||
scene black
|
||||
if not _restart and config.auto_load and renpy.can_load(config.auto_load):
|
||||
$ renpy.load(config.auto_load)
|
||||
|
||||
if config.start_scene_black:
|
||||
scene black
|
||||
else:
|
||||
scene
|
||||
|
||||
if not _restart:
|
||||
$ ui.pausebehavior(0)
|
||||
$ ui.interact(suppress_underlay=True, suppress_overlay=True)
|
||||
@@ -642,7 +742,9 @@ label _start:
|
||||
$ renpy.block_rollback()
|
||||
|
||||
$ _old_game_menu_screen = _game_menu_screen
|
||||
$ _old_predict_screens = _predict_screens
|
||||
$ _game_menu_screen = None
|
||||
$ _predict_screens = [ 'main_menu' ]
|
||||
|
||||
if renpy.has_label("splashscreen") and not _restart:
|
||||
call expression "splashscreen" from _call_splashscreen_1
|
||||
@@ -652,48 +754,57 @@ label _start:
|
||||
|
||||
$ renpy.block_rollback()
|
||||
|
||||
python hide:
|
||||
for i in range(0, 7):
|
||||
# renpy.music.stop(channel=i)
|
||||
# renpy.sound.stop(channel=i)
|
||||
pass
|
||||
|
||||
if config.main_menu_music:
|
||||
$ renpy.music.play(config.main_menu_music, if_changed=True)
|
||||
else:
|
||||
$ renpy.music.stop()
|
||||
|
||||
# Clean out any residual scene from the splashscreen.
|
||||
scene black
|
||||
|
||||
if _restart is None:
|
||||
$ renpy.transition(config.end_splash_transition)
|
||||
if config.start_scene_black:
|
||||
scene black
|
||||
else:
|
||||
$ renpy.transition(_restart[0])
|
||||
jump expression _restart[1]
|
||||
scene
|
||||
|
||||
|
||||
# This has to be python, to deal with a case where _restart may
|
||||
# change across a shift-reload.
|
||||
python:
|
||||
if _restart is None:
|
||||
renpy.transition(config.end_splash_transition)
|
||||
else:
|
||||
renpy.transition(_restart[0])
|
||||
renpy.jump(_restart[1])
|
||||
|
||||
label _invoke_main_menu:
|
||||
|
||||
$ renpy.call_in_new_context("_enter_main_menu")
|
||||
|
||||
# Again, this has to be python.
|
||||
python:
|
||||
if _restart:
|
||||
renpy.call_in_new_context(_restart[2])
|
||||
else:
|
||||
renpy.call_in_new_context("_main_menu")
|
||||
|
||||
|
||||
# If the main menu returns, then start the game.
|
||||
jump start
|
||||
|
||||
# At this point, we've been switched into a new context. So we
|
||||
# initialize it.
|
||||
label _enter_main_menu:
|
||||
label _main_menu(_main_menu_screen="_main_menu_screen"):
|
||||
|
||||
call _enter_menu from _call__enter_menu_1
|
||||
$ _enter_menu()
|
||||
|
||||
python:
|
||||
renpy.dynamic("_load_prompt")
|
||||
_load_prompt = False
|
||||
|
||||
renpy.context().main_menu = True
|
||||
renpy.context()._main_menu = True
|
||||
store.main_menu = True
|
||||
|
||||
jump expression _main_menu_screen
|
||||
|
||||
# This is called to show the main menu to the user.
|
||||
label _main_menu:
|
||||
label _main_menu_screen:
|
||||
|
||||
# Let the user completely override the main menu. (But please note
|
||||
# it still lives in the menu context, rather than the game context.)
|
||||
@@ -701,11 +812,96 @@ label _main_menu:
|
||||
jump expression "main_menu"
|
||||
|
||||
# New name.
|
||||
if renpy.has_label("main_menu_screen"):
|
||||
elif renpy.has_label("main_menu_screen"):
|
||||
jump expression "main_menu_screen"
|
||||
|
||||
# Compatibility name.
|
||||
if renpy.has_label("_library_main_menu"):
|
||||
elif renpy.has_label("_library_main_menu"):
|
||||
jump expression "_library_main_menu"
|
||||
|
||||
return
|
||||
|
||||
init 1180 python hide:
|
||||
|
||||
def create_automatic_images():
|
||||
|
||||
seps = config.automatic_images
|
||||
|
||||
if seps is True:
|
||||
seps = [ ' ', '/', '_' ]
|
||||
|
||||
for dir, fn in renpy.loader.listdirfiles():
|
||||
|
||||
if fn.startswith("_"):
|
||||
continue
|
||||
|
||||
# Only .png and .jpg
|
||||
if not fn.lower().endswith(".png") and not fn.lower().endswith(".jpg"):
|
||||
continue
|
||||
|
||||
# Strip the extension, replace slashes.
|
||||
shortfn = fn[:-4].replace("\\", "/")
|
||||
|
||||
# Determine the name.
|
||||
name = ( shortfn, )
|
||||
for sep in seps:
|
||||
name = tuple(j for i in name for j in i.split(sep))
|
||||
|
||||
# Strip name components.
|
||||
while name:
|
||||
for i in config.automatic_images_strip:
|
||||
if name[0] == i:
|
||||
name = name[1:]
|
||||
break
|
||||
else:
|
||||
break
|
||||
|
||||
# Only names of 2 components or more.
|
||||
if len(name) < 2:
|
||||
continue
|
||||
|
||||
# Reject if it already exists.
|
||||
if name in renpy.display.image.images:
|
||||
continue
|
||||
|
||||
renpy.image(name, fn)
|
||||
|
||||
if config.automatic_images:
|
||||
create_automatic_images()
|
||||
|
||||
|
||||
# Load the developer screen, if necessary.
|
||||
init 1180 python hide:
|
||||
|
||||
if config.developer:
|
||||
renpy.load_module("_developer")
|
||||
|
||||
# Entry point for the developer screen. The rest of it is loaded from
|
||||
# _developer.rpym
|
||||
label _developer:
|
||||
|
||||
if not config.developer:
|
||||
return
|
||||
|
||||
$ _enter_menu()
|
||||
|
||||
jump expression "_developer_screen"
|
||||
|
||||
|
||||
# Translations.
|
||||
init -1180 python:
|
||||
|
||||
def _language_activate():
|
||||
|
||||
if persistent._language:
|
||||
language = persistent._language
|
||||
else:
|
||||
language = "translations"
|
||||
|
||||
if renpy.loadable(language + ".rpt"):
|
||||
config.translator = renpy.Translator(language)
|
||||
else:
|
||||
config.translator = None
|
||||
|
||||
_language_activate()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Copyright 2008 PyTom
|
||||
#
|
||||
# Please see the LICENSE.txt distributed with Ren'Py for permission to
|
||||
# copy and modify.
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# Common stuff that's used by the various Ren'Py menus. This includes
|
||||
# the default definitions of config.main_menu and config.game_menu, as
|
||||
@@ -12,9 +10,10 @@ init -1150 python:
|
||||
|
||||
config.main_menu = [
|
||||
(u"Start Game", "start", "True"),
|
||||
(u"Continue Game", _intra_jumps("load_screen", "main_game_transition"), "True"),
|
||||
(u"Load Game", _intra_jumps("load_screen", "main_game_transition"), "True"),
|
||||
(u"Preferences", _intra_jumps("preferences_screen", "main_game_transition"), "True"),
|
||||
(u"Quit", ui.jumps("_quit"), "True")
|
||||
(u"Help", _help, "True", "config.help"),
|
||||
(u"Quit", ui.jumps("_quit"), "True"),
|
||||
]
|
||||
|
||||
config.game_menu = [
|
||||
@@ -23,17 +22,22 @@ init -1150 python:
|
||||
( "save", u"Save Game", _intra_jumps("save_screen", "intra_transition"), 'not main_menu' ),
|
||||
( "load", u"Load Game", _intra_jumps("load_screen", "intra_transition"), 'True'),
|
||||
( None, u"Main Menu", ui.callsinnewcontext("_main_menu_prompt"), 'not main_menu' ),
|
||||
( "help", u"Help", _help, "True", "config.help"),
|
||||
( None, u"Quit", ui.callsinnewcontext("_quit_prompt"), 'True' ),
|
||||
]
|
||||
|
||||
label _quit_prompt:
|
||||
if layout.yesno_prompt(None, u"Are you sure you want to quit?"):
|
||||
$ renpy.loadsave.force_autosave()
|
||||
|
||||
if layout.yesno_prompt(None, layout.QUIT):
|
||||
jump _quit
|
||||
else:
|
||||
return
|
||||
|
||||
label _main_menu_prompt:
|
||||
if layout.yesno_prompt(None, u"Are you sure you want to return to the main menu?\nThis will lose unsaved progress."):
|
||||
$ renpy.loadsave.force_autosave()
|
||||
|
||||
if layout.yesno_prompt(None, layout.MAIN_MENU):
|
||||
$ renpy.full_restart(transition=config.game_main_transition)
|
||||
else:
|
||||
return
|
||||
|
||||
@@ -1,17 +1,32 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains code that sets up the various mixers, based on how
|
||||
# the user sets config.has_music, .has_sound, and .has_voice.
|
||||
|
||||
init -1130:
|
||||
|
||||
init -1130 python hide:
|
||||
|
||||
# Set to true in the very unlikely event you want to manually init
|
||||
# the sound system.
|
||||
$ config.force_sound = False
|
||||
config.force_sound = False
|
||||
|
||||
# basics: True if the game will have music.
|
||||
$ config.has_music = True
|
||||
config.has_music = True
|
||||
|
||||
# basics: True if the game will have sound effects.
|
||||
$ config.has_sound = True
|
||||
config.has_sound = True
|
||||
|
||||
# Register 8 channels by default, for compatiblity with older version
|
||||
# of Ren'Py.
|
||||
for i in xrange(0, 8):
|
||||
renpy.music.register_channel(i)
|
||||
|
||||
renpy.music.register_channel("movie", "music", False, stop_on_mute=False, buffer_queue=False)
|
||||
|
||||
# Set up default names for some of the channels.
|
||||
renpy.music.alias_channel(0, "sound")
|
||||
renpy.music.alias_channel(7, "music")
|
||||
renpy.music.alias_channel(2, "voice")
|
||||
|
||||
init 1130:
|
||||
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains the code to implement Ren'Py's music room function,
|
||||
# which consists of the ability to set up a playlist (the aforementioned
|
||||
# "music room"), and then a series of actions that let the player
|
||||
# navigate through the music room.
|
||||
|
||||
init -1135 python:
|
||||
|
||||
class __MusicRoomPlay(Action):
|
||||
"""
|
||||
The action returned by MusicRoom.Play when called with a file.
|
||||
"""
|
||||
|
||||
def __init__(self, mr, filename):
|
||||
self.mr = mr
|
||||
self.filename = filename
|
||||
self.selected = self.get_selected()
|
||||
|
||||
def __call__(self):
|
||||
self.mr.play(self.filename, 0)
|
||||
|
||||
def get_sensitive(self):
|
||||
return self.mr.is_unlocked(self.filename)
|
||||
|
||||
def get_selected(self):
|
||||
return renpy.music.get_playing(self.mr.channel) == self.filename
|
||||
|
||||
def periodic(self, st):
|
||||
if self.selected != self.get_selected():
|
||||
renpy.restart_interaction()
|
||||
|
||||
return .1
|
||||
|
||||
class MusicRoom(object):
|
||||
"""
|
||||
:doc: music_room class
|
||||
|
||||
A music room that contains a series of songs that can be unlocked
|
||||
by the user, and actions that can play entries from the list in
|
||||
order.
|
||||
"""
|
||||
|
||||
def __init__(self, channel="music", fadeout=0.0, fadein=0.0):
|
||||
"""
|
||||
`channel`
|
||||
The channel that this music room will operate on.
|
||||
|
||||
`fadeout`
|
||||
The number of seconds it takes to fade out the old
|
||||
music when changing tracks.
|
||||
|
||||
`fadein`
|
||||
The number of seconds it takes to fade in the new
|
||||
music when changing tracks.
|
||||
"""
|
||||
|
||||
self.channel = channel
|
||||
self.fadeout = fadeout
|
||||
self.fadein = fadein
|
||||
|
||||
# The list of strings giving the titles of songs that make up the
|
||||
# playlist.
|
||||
self.playlist = [ ]
|
||||
|
||||
# A set of filenames, so we can quickly check if a valid filename
|
||||
# has been provided.
|
||||
self.filenames = set()
|
||||
|
||||
# The set of songs that are always unlocked.
|
||||
self.always_unlocked = set()
|
||||
|
||||
|
||||
def add(self, filename, always_unlocked=False):
|
||||
"""
|
||||
:doc: music_room method
|
||||
|
||||
Adds the music file `filename` to this music room. The music room
|
||||
will play unlocked files in the order that they are added to the
|
||||
room.
|
||||
|
||||
`always_unlocked`
|
||||
If true, the music file will be always unlocked. This allows
|
||||
the file to show up in the music room before it has been
|
||||
played in the game.
|
||||
"""
|
||||
|
||||
self.playlist.append(filename)
|
||||
self.filenames.add(filename)
|
||||
|
||||
if always_unlocked:
|
||||
self.always_unlocked.add(filename)
|
||||
|
||||
def is_unlocked(self, filename):
|
||||
"""
|
||||
:doc: music_room method
|
||||
|
||||
Returns true if the filename has been unlocked (or is always
|
||||
unlocked), and false if it is still locked.
|
||||
"""
|
||||
|
||||
if filename in self.always_unlocked:
|
||||
return True
|
||||
|
||||
return renpy.seen_audio(filename)
|
||||
|
||||
def unlocked_playlist(self):
|
||||
"""
|
||||
Returns a list of filenames in the playlist that have been
|
||||
unlocked.
|
||||
"""
|
||||
|
||||
return [ i for i in self.playlist if self.is_unlocked(i) ]
|
||||
|
||||
def play(self, filename=None, offset=0):
|
||||
"""
|
||||
Starts the music room playing. The file we start playing with is
|
||||
selected in two steps.
|
||||
|
||||
If `filename` is an unlocked file, we start by playing it.
|
||||
Otherwise, we start by playing the currently playing file, and if
|
||||
that doesn't exist or isn't unlocked, we start with the first file.
|
||||
|
||||
We then apply `offset`. If `offset` is positive, we advance that many
|
||||
files, otherwise we go back that many files.
|
||||
|
||||
The selected file is then played.
|
||||
|
||||
"""
|
||||
|
||||
playlist = self.unlocked_playlist()
|
||||
|
||||
if not playlist:
|
||||
return
|
||||
|
||||
if filename is None:
|
||||
filename = renpy.music.get_playing(channel=self.channel)
|
||||
|
||||
try:
|
||||
idx = playlist.index(filename)
|
||||
except ValueError:
|
||||
idx = 0
|
||||
|
||||
idx = (idx + offset) % len(playlist)
|
||||
|
||||
playlist = playlist[idx:] + playlist[:idx]
|
||||
|
||||
renpy.music.play(playlist, channel=self.channel, fadeout=self.fadeout, fadein=self.fadein)
|
||||
|
||||
def stop(self):
|
||||
"""
|
||||
Stops the music from playing.
|
||||
"""
|
||||
|
||||
renpy.music.stop(channel=self.channel, fadeout=self.fadeout)
|
||||
|
||||
def next(self):
|
||||
"""
|
||||
Plays the next file in the playlist.
|
||||
"""
|
||||
|
||||
return self.play(None, 1)
|
||||
|
||||
def previous(self):
|
||||
"""
|
||||
Plays the previous file in the playlist.
|
||||
"""
|
||||
|
||||
return self.play(None, -1)
|
||||
|
||||
def Play(self, filename=None):
|
||||
"""
|
||||
:doc: music_room method
|
||||
|
||||
Causes the music room to start playing. If `filename` is given, that
|
||||
file begins playing. Otherwise, the currently playing file starts
|
||||
over (if it's unlocked), or the first file starts playing.
|
||||
|
||||
If `filename` is given, buttons with this action will be insensitive
|
||||
while `filename` is locked, and will be selected when `filename`
|
||||
is playing.
|
||||
"""
|
||||
|
||||
if filename is None:
|
||||
return self.play
|
||||
|
||||
if filename not in self.filenames:
|
||||
raise Exception("{0!r} is not a filename registered with this music room.".format(filename))
|
||||
|
||||
return __MusicRoomPlay(self, filename)
|
||||
|
||||
def Stop(self):
|
||||
"""
|
||||
:doc: music_room method
|
||||
|
||||
Stops the music.
|
||||
"""
|
||||
|
||||
return self.stop
|
||||
|
||||
|
||||
def Next(self):
|
||||
"""
|
||||
:doc: music_room method
|
||||
|
||||
An action that causes the music room to play the next unlocked file
|
||||
in the playlist.
|
||||
"""
|
||||
|
||||
return self.next
|
||||
|
||||
def Previous(self):
|
||||
"""
|
||||
:doc: music_room method
|
||||
|
||||
An action that causes the music room to play the previous unlocked
|
||||
file in the playlist.
|
||||
"""
|
||||
|
||||
return self.previous
|
||||
@@ -1,3 +1,6 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This is an implementation of NVL-mode, which can be used to show
|
||||
# dialogue in a fullscreen way, like NVL-style games. Multiple lines
|
||||
# of dialogue are shown on the screen at once, whenever a line of
|
||||
@@ -76,9 +79,58 @@ init -1100 python:
|
||||
return s[nvl_variant]
|
||||
else:
|
||||
return s
|
||||
|
||||
def nvl_show_core():
|
||||
|
||||
def __nvl_screen_dialogue():
|
||||
"""
|
||||
Returns widget_properties and dialogue for the current NVL
|
||||
mode screen.
|
||||
"""
|
||||
|
||||
widget_properties = { }
|
||||
dialogue = [ ]
|
||||
|
||||
for i, entry in enumerate(nvl_list):
|
||||
if not entry:
|
||||
continue
|
||||
|
||||
who, what, kwargs = entry
|
||||
|
||||
if i == len(nvl_list) - 1:
|
||||
who_id = "who"
|
||||
what_id = "what"
|
||||
window_id = "window"
|
||||
|
||||
else:
|
||||
who_id = "who%d" % i
|
||||
what_id = "what%d" % i
|
||||
window_id = "window%d" % i
|
||||
|
||||
widget_properties[who_id] = kwargs["who_args"]
|
||||
widget_properties[what_id] = kwargs["what_args"]
|
||||
widget_properties[window_id] = kwargs["window_args"]
|
||||
|
||||
dialogue.append((who, what, who_id, what_id, window_id))
|
||||
|
||||
return widget_properties, dialogue
|
||||
|
||||
def __nvl_show_screen(screen_name, **scope):
|
||||
"""
|
||||
Shows an nvl-mode screen. Returns the "what" widget.
|
||||
"""
|
||||
|
||||
widget_properties, dialogue = __nvl_screen_dialogue()
|
||||
|
||||
renpy.show_screen(screen_name, _transient=True, _widget_properties=widget_properties, dialogue=dialogue, **scope)
|
||||
renpy.shown_window()
|
||||
|
||||
return renpy.get_widget(screen_name, "what")
|
||||
|
||||
def nvl_show_core(who=None, what=None):
|
||||
|
||||
# Screen version.
|
||||
if renpy.has_screen("nvl"):
|
||||
return __nvl_show_screen("nvl", items=[ ])
|
||||
|
||||
if renpy.in_rollback():
|
||||
nvl_window = __s(style.nvl_window)['rollback']
|
||||
nvl_vbox = __s(style.nvl_vbox)['rollback']
|
||||
@@ -99,8 +151,14 @@ init -1100 python:
|
||||
rv = config.nvl_show_display_say(who, what, variant=nvl_variant, **kw)
|
||||
|
||||
ui.close()
|
||||
|
||||
renpy.shown_window()
|
||||
|
||||
return rv
|
||||
|
||||
def nvl_window():
|
||||
nvl_show_core()
|
||||
|
||||
def nvl_show(with_):
|
||||
nvl_show_core()
|
||||
renpy.with_statement(with_)
|
||||
@@ -157,6 +215,7 @@ init -1100 python:
|
||||
**properties)
|
||||
|
||||
def do_add(self, who, what):
|
||||
|
||||
if store.nvl_list is None:
|
||||
store.nvl_list = [ ]
|
||||
|
||||
@@ -185,16 +244,19 @@ init -1100 python:
|
||||
else:
|
||||
checkpoint = True
|
||||
|
||||
renpy.display_say(nvl_show_core,
|
||||
checkpoint=checkpoint,
|
||||
**display_args)
|
||||
renpy.display_say(
|
||||
who,
|
||||
what,
|
||||
nvl_show_core,
|
||||
checkpoint=checkpoint,
|
||||
**display_args)
|
||||
|
||||
def do_done(self, who, what):
|
||||
|
||||
if self.clear:
|
||||
nvl_clear()
|
||||
|
||||
def do_extend(self):
|
||||
renpy.mode(self.mode)
|
||||
store.nvl_list = store.nvl_list[:-1]
|
||||
|
||||
# The default NVLCharacter.
|
||||
@@ -204,21 +266,54 @@ init -1100 python:
|
||||
what_style='nvl_dialogue',
|
||||
window_style='nvl_entry',
|
||||
type='nvl',
|
||||
mode='nvl',
|
||||
clear=False,
|
||||
kind=adv)
|
||||
|
||||
def nvl_clear():
|
||||
|
||||
store.nvl_list = [ ]
|
||||
|
||||
# Run clear at the start of the game.
|
||||
config.start_callbacks.append(nvl_clear)
|
||||
|
||||
|
||||
|
||||
def nvl_menu(items):
|
||||
|
||||
renpy.mode('nvl_menu')
|
||||
|
||||
if nvl_list is None:
|
||||
store.nvl_list = [ ]
|
||||
|
||||
screen = None
|
||||
|
||||
if renpy.has_screen("nvl_choice"):
|
||||
screen = "nvl_choice"
|
||||
elif renpy.has_screen("nvl"):
|
||||
screen = "nvl"
|
||||
|
||||
if screen is not None:
|
||||
|
||||
widget_properties, dialogue = __nvl_screen_dialogue()
|
||||
|
||||
return renpy.display_menu(
|
||||
items,
|
||||
widget_properties=widget_properties,
|
||||
screen=screen,
|
||||
scope={ "dialogue" : dialogue },
|
||||
window_style=__s(style.nvl_menu_window),
|
||||
choice_style=__s(style.nvl_menu_choice),
|
||||
choice_chosen_style=__s(style.nvl_menu_choice_chosen),
|
||||
choice_button_style=__s(style.nvl_menu_choice_button),
|
||||
choice_chosen_button_style=__s(style.nvl_menu_choice_chosen_button),
|
||||
type="nvl",
|
||||
)
|
||||
|
||||
|
||||
# Traditional version.
|
||||
ui.layer("transient")
|
||||
ui.clear()
|
||||
ui.close()
|
||||
|
||||
ui.window(style=__s(style.nvl_window))
|
||||
ui.vbox(style=__s(style.nvl_vbox))
|
||||
|
||||
@@ -246,32 +341,28 @@ init -1100 python:
|
||||
|
||||
return rv
|
||||
|
||||
NVLSpeaker = NVLCharacter
|
||||
|
||||
config.nvl_adv_transition = None
|
||||
config.adv_nvl_transition = None
|
||||
|
||||
init 1140 python:
|
||||
|
||||
if config.nvl_adv_transition or config.adv_nvl_transition:
|
||||
# This is used to execute the nvl and adv mode transitions.
|
||||
def _nvl_adv_callback(mode, old_modes):
|
||||
|
||||
def _nvl_adv_callback(event, interact, type, **kwargs):
|
||||
|
||||
if event != "begin" or not interact or renpy.get_transition():
|
||||
return
|
||||
|
||||
old_type = renpy.last_interact_type()
|
||||
|
||||
if old_type == "say" and type == "nvl":
|
||||
# We have an extra line in the nvl_list as we do this. So
|
||||
# take it out for the duration of the nvl_show.
|
||||
old_nvl_list = store.nvl_list
|
||||
store.nvl_list = old_nvl_list[:-1]
|
||||
nvl_show(config.adv_nvl_transition)
|
||||
store.nvl_list = old_nvl_list
|
||||
elif old_type == "nvl" and type == "say":
|
||||
nvl_hide(config.nvl_adv_transition)
|
||||
|
||||
config.all_character_callbacks.insert(0, _nvl_adv_callback)
|
||||
old = old_modes[0]
|
||||
|
||||
if config.adv_nvl_transition:
|
||||
if mode == "nvl" or mode == "nvl_menu":
|
||||
if old == "say" or old == "menu":
|
||||
nvl_show(config.adv_nvl_transition)
|
||||
|
||||
if config.nvl_adv_transition:
|
||||
if mode == "say" or mode == "menu":
|
||||
if old == "nvl" or old == "nvl_menu":
|
||||
nvl_hide(config.nvl_adv_transition)
|
||||
|
||||
config.mode_callbacks.append(_nvl_adv_callback)
|
||||
|
||||
python early hide:
|
||||
|
||||
|
||||
@@ -63,15 +63,19 @@ init -1080 python:
|
||||
|
||||
def init_values(self, sizes):
|
||||
def to_abs_(value, size):
|
||||
if isinstance(value, float):
|
||||
if type(value) == float:
|
||||
return value * size
|
||||
else:
|
||||
return value
|
||||
|
||||
def coord_(c):
|
||||
|
||||
if len(c) == 2:
|
||||
c = c + (0, 0)
|
||||
|
||||
return ( to_abs_(c[0], sizes[0]) - to_abs_(c[2], sizes[2]),
|
||||
to_abs_(c[1], sizes[1]) - to_abs_(c[3], sizes[3]) )
|
||||
|
||||
|
||||
for p in self.points:
|
||||
for i in range(1, len(p)):
|
||||
p[i] = coord_(p[i])
|
||||
@@ -122,8 +126,8 @@ init -1080 python:
|
||||
t3 = t**3
|
||||
|
||||
result = [ t_ppp * start[i] + t_pp * self.points[segment][2][i] + t_p * self.points[segment][3][i] + t3 * end[i] for i in 0,1 ]
|
||||
|
||||
return ( int(result[0]), int(result[1]), 0, 0 )
|
||||
|
||||
return ( absolute(result[0]), absolute(result[1]), 0, 0 )
|
||||
|
||||
def SplineMotion(points, time, child=None, anchors=(0.5, 0.5), repeat=False, bounce=False, anim_timebase=False, style='default', time_warp=None, **properties):
|
||||
return Motion(_SplineInterpolator(points, anchors), time, child, repeat=repeat, bounce=bounce, anim_timebase=anim_timebase, style=style, time_warp=time_warp, add_sizes=True, **properties)
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains code that creates a few new statements. We'll
|
||||
# also describe here the API for defining your own statements.
|
||||
#
|
||||
# Statements can be defined by calling renpy.statements.register. This
|
||||
# function takes a string giving the keywords at the start of the
|
||||
# statement, and then up to 4 functions defining the behavior of the
|
||||
# statement: parse, execute, predict, and lint
|
||||
# statement: parse, execute, predict, and lint. If given the keyword
|
||||
# argument block=True, the statement will take a block.
|
||||
#
|
||||
# The parse function takes a lexer object as an argument, and is
|
||||
# expected to return some parser data. The lexer has the following
|
||||
@@ -28,6 +32,13 @@
|
||||
# l.revert(o) - Given the object returned by l.checkpoint(), returns
|
||||
# there.
|
||||
#
|
||||
# l.subblock_lexer() - Return a lexer that gives a sub-block for the
|
||||
# block associated with the current statement.
|
||||
# l.advance() - In a subblock lexer, advance to the next line. This needs
|
||||
# to be called before the above functions can be called on the first line.
|
||||
#
|
||||
#
|
||||
#
|
||||
# The parse function is expected to return an object, which is passed
|
||||
# to the other functions. Parse should call renpy.error with the error
|
||||
# message to report an error.
|
||||
@@ -67,6 +78,8 @@ python early hide:
|
||||
fadeout = "None"
|
||||
fadein = "0"
|
||||
channel = None
|
||||
loop = None
|
||||
if_changed = False
|
||||
|
||||
while True:
|
||||
|
||||
@@ -93,42 +106,63 @@ python early hide:
|
||||
renpy.error('expected simple expression')
|
||||
|
||||
continue
|
||||
|
||||
|
||||
if l.keyword('loop'):
|
||||
loop = True
|
||||
continue
|
||||
|
||||
if l.keyword('noloop'):
|
||||
loop = False
|
||||
continue
|
||||
|
||||
if l.keyword('if_changed'):
|
||||
if_changed = True
|
||||
continue
|
||||
|
||||
renpy.error('could not parse statement.')
|
||||
|
||||
return dict(file=file,
|
||||
fadeout=fadeout,
|
||||
fadein=fadein,
|
||||
channel=channel)
|
||||
channel=channel,
|
||||
loop=loop,
|
||||
if_changed=if_changed)
|
||||
|
||||
def execute_play_music(p):
|
||||
|
||||
if p["channel"] is not None:
|
||||
channel = eval(p["channel"])
|
||||
else:
|
||||
channel = 7
|
||||
channel = "music"
|
||||
|
||||
renpy.music.play(eval(p["file"]),
|
||||
fadeout=eval(p["fadeout"]),
|
||||
fadein=eval(p["fadein"]),
|
||||
channel=channel)
|
||||
channel=channel,
|
||||
loop=p.get("loop", None),
|
||||
if_changed=p.get("if_changed", False))
|
||||
|
||||
def predict_play_music(p):
|
||||
return [ ]
|
||||
|
||||
def lint_play_music(p):
|
||||
def lint_play_music(p, channel="music"):
|
||||
|
||||
file = _try_eval(p["file"], 'filename')
|
||||
if p["channel"] is not None:
|
||||
_try_eval(p["channel"], 'channel')
|
||||
|
||||
if p["channel"] is not None:
|
||||
channel = _try_eval(p["channel"], 'channel')
|
||||
|
||||
if not isinstance(file, list):
|
||||
file = [ file ]
|
||||
|
||||
for fn in file:
|
||||
if isinstance(fn, basestring) and not renpy.loadable(fn):
|
||||
renpy.error("%r is not loadable" % fn)
|
||||
|
||||
if isinstance(fn, basestring):
|
||||
try:
|
||||
if not renpy.music.playable(fn, channel):
|
||||
renpy.error("%r is not loadable" % fn)
|
||||
except:
|
||||
pass
|
||||
|
||||
renpy.statements.register('play music',
|
||||
parse=parse_play_music,
|
||||
execute=execute_play_music,
|
||||
@@ -145,24 +179,37 @@ python early hide:
|
||||
renpy.error("queue requires a file")
|
||||
|
||||
channel = None
|
||||
|
||||
if l.keyword('channel'):
|
||||
channel = l.simple_expression()
|
||||
if channel is None:
|
||||
renpy.error('expected simple expression')
|
||||
loop = None
|
||||
|
||||
while not l.eol():
|
||||
|
||||
if l.keyword('channel'):
|
||||
channel = l.simple_expression()
|
||||
if channel is None:
|
||||
renpy.error('expected simple expression')
|
||||
|
||||
if not l.eol():
|
||||
renpy.error("expected end of line")
|
||||
if l.keyword('loop'):
|
||||
loop = True
|
||||
continue
|
||||
|
||||
if l.keyword('noloop'):
|
||||
loop = False
|
||||
continue
|
||||
|
||||
return dict(file=file, channel=channel)
|
||||
renpy.error('expected end of line')
|
||||
|
||||
return dict(file=file, channel=channel, loop=loop)
|
||||
|
||||
def execute_queue_music(p):
|
||||
if p["channel"] is not None:
|
||||
channel = eval(p["channel"])
|
||||
else:
|
||||
channel = 7
|
||||
channel = "music"
|
||||
|
||||
renpy.music.queue(eval(p["file"]), channel=channel)
|
||||
renpy.music.queue(
|
||||
eval(p["file"]),
|
||||
channel=channel,
|
||||
loop=p.get("loop", None))
|
||||
|
||||
|
||||
renpy.statements.register('queue music',
|
||||
@@ -195,7 +242,7 @@ python early hide:
|
||||
if p["channel"] is not None:
|
||||
channel = eval(p["channel"])
|
||||
else:
|
||||
channel = 7
|
||||
channel = "music"
|
||||
|
||||
renpy.music.stop(fadeout=eval(p["fadeout"]), channel=channel)
|
||||
|
||||
@@ -212,7 +259,7 @@ python early hide:
|
||||
if p["channel"] is not None:
|
||||
channel = eval(p["channel"])
|
||||
else:
|
||||
channel = 0
|
||||
channel = "sound"
|
||||
|
||||
fadeout = eval(p["fadeout"]) or 0
|
||||
|
||||
@@ -220,17 +267,20 @@ python early hide:
|
||||
fadeout=fadeout,
|
||||
fadein=eval(p["fadein"]),
|
||||
channel=channel)
|
||||
|
||||
|
||||
def lint_play_sound(p, lint_play_music=lint_play_music):
|
||||
return lint_play_music(p, channel="sound")
|
||||
|
||||
renpy.statements.register('play sound',
|
||||
parse=parse_play_music,
|
||||
execute=execute_play_sound,
|
||||
lint=lint_play_music)
|
||||
lint=lint_play_sound)
|
||||
|
||||
def execute_queue_sound(p):
|
||||
if p["channel"] is not None:
|
||||
channel = eval(p["channel"])
|
||||
else:
|
||||
channel = 0
|
||||
channel = "sound"
|
||||
|
||||
renpy.sound.queue(eval(p["file"]), channel=channel)
|
||||
|
||||
@@ -244,7 +294,7 @@ python early hide:
|
||||
if p["channel"] is not None:
|
||||
channel = eval(p["channel"])
|
||||
else:
|
||||
channel = 0
|
||||
channel = "sound"
|
||||
|
||||
fadeout = eval(p["fadeout"]) or 0
|
||||
|
||||
@@ -254,13 +304,266 @@ python early hide:
|
||||
parse=parse_stop_music,
|
||||
execute=execute_stop_sound)
|
||||
|
||||
|
||||
# Generic play/queue/stop statements. These take a channel name as
|
||||
# the second thing.
|
||||
|
||||
def parse_play_generic(l, parse_play_music=parse_play_music):
|
||||
channel = l.name()
|
||||
|
||||
if channel is None:
|
||||
renpy.error('play requires a channel')
|
||||
|
||||
rv = parse_play_music(l)
|
||||
if rv["channel"] is None:
|
||||
rv["channel"] = repr(channel)
|
||||
|
||||
return rv
|
||||
|
||||
def parse_queue_generic(l, parse_queue_music=parse_queue_music):
|
||||
channel = l.name()
|
||||
|
||||
if channel is None:
|
||||
renpy.error('queue requires a channel')
|
||||
|
||||
rv = parse_queue_music(l)
|
||||
if rv["channel"] is None:
|
||||
rv["channel"] = repr(channel)
|
||||
|
||||
return rv
|
||||
|
||||
def parse_stop_generic(l, parse_stop_music=parse_stop_music):
|
||||
channel = l.name()
|
||||
|
||||
if channel is None:
|
||||
renpy.error('stop requires a channel')
|
||||
|
||||
rv = parse_stop_music(l)
|
||||
if rv["channel"] is None:
|
||||
rv["channel"] = repr(channel)
|
||||
|
||||
return rv
|
||||
|
||||
def lint_play_generic(p, lint_play_music=lint_play_music):
|
||||
channel = eval(p["channel"])
|
||||
|
||||
if not renpy.music.channel_defined(channel):
|
||||
renpy.error("channel %r is not defined" % channel)
|
||||
|
||||
lint_play_music(p, channel)
|
||||
|
||||
def lint_stop_generic(p):
|
||||
channel = eval(p["channel"])
|
||||
|
||||
if not renpy.music.channel_defined(channel):
|
||||
renpy.error("channel %r is not defined" % channel)
|
||||
|
||||
renpy.statements.register('play',
|
||||
parse=parse_play_generic,
|
||||
execute=execute_play_music,
|
||||
predict=predict_play_music,
|
||||
lint=lint_play_generic)
|
||||
|
||||
renpy.statements.register('queue',
|
||||
parse=parse_queue_generic,
|
||||
execute=execute_queue_music,
|
||||
lint=lint_play_generic)
|
||||
|
||||
renpy.statements.register('stop',
|
||||
parse=parse_stop_generic,
|
||||
execute=execute_stop_music,
|
||||
lint=lint_stop_generic)
|
||||
|
||||
|
||||
##########################################################################
|
||||
# "window show" and "window hide" statements.
|
||||
|
||||
def parse_window(l):
|
||||
p = l.simple_expression()
|
||||
if not l.eol():
|
||||
renpy.error('expected end of line')
|
||||
|
||||
return p
|
||||
|
||||
def lint_window(p):
|
||||
if p is not None:
|
||||
_try_eval(p, 'window transition')
|
||||
|
||||
def execute_window_show(p):
|
||||
if store._window:
|
||||
return
|
||||
|
||||
if p is not None:
|
||||
trans = eval(p)
|
||||
else:
|
||||
trans = config.window_show_transition
|
||||
|
||||
renpy.with_statement(None)
|
||||
store._window = True
|
||||
renpy.with_statement(trans)
|
||||
|
||||
def execute_window_hide(p):
|
||||
if not _window:
|
||||
return
|
||||
|
||||
if p is not None:
|
||||
trans = eval(p)
|
||||
else:
|
||||
trans = config.window_hide_transition
|
||||
|
||||
renpy.with_statement(None)
|
||||
store._window = False
|
||||
renpy.with_statement(trans)
|
||||
|
||||
renpy.statements.register('window show',
|
||||
parse=parse_window,
|
||||
execute=execute_window_show,
|
||||
lint=lint_window)
|
||||
|
||||
renpy.statements.register('window hide',
|
||||
parse=parse_window,
|
||||
execute=execute_window_hide,
|
||||
lint=lint_window)
|
||||
|
||||
##########################################################################
|
||||
# Pause statement.
|
||||
|
||||
def parse_pause(l):
|
||||
|
||||
delay = l.simple_expression()
|
||||
|
||||
if not l.eol():
|
||||
renpy.error("expected end of line.")
|
||||
|
||||
return { "delay" : delay }
|
||||
|
||||
def lint_pause(p):
|
||||
|
||||
if p["delay"]:
|
||||
_try_eval(p["delay"], 'pause statement')
|
||||
|
||||
def execute_pause(p):
|
||||
|
||||
if p["delay"]:
|
||||
delay = eval(p["delay"])
|
||||
renpy.with_statement(Pause(delay))
|
||||
else:
|
||||
renpy.pause()
|
||||
|
||||
|
||||
renpy.statements.register('pause',
|
||||
parse=parse_pause,
|
||||
lint=lint_pause,
|
||||
execute=execute_pause)
|
||||
|
||||
|
||||
init -1200 python:
|
||||
|
||||
config.window_show_transition = None
|
||||
config.window_hide_transition = None
|
||||
|
||||
def _try_eval(e, what):
|
||||
try:
|
||||
return eval(e)
|
||||
except:
|
||||
renpy.error('unable to evaluate %s %r' % (what, e))
|
||||
|
||||
##############################################################################
|
||||
# Screen-related statements.
|
||||
|
||||
python early hide:
|
||||
|
||||
def parse_show_call_screen(l):
|
||||
|
||||
# Parse a name.
|
||||
name = l.require(l.name)
|
||||
|
||||
# Parse a parameter list. (name -> expression string)
|
||||
parameters = { }
|
||||
|
||||
if l.match(r"\("):
|
||||
|
||||
while True:
|
||||
pname = l.name()
|
||||
if not pname:
|
||||
break
|
||||
|
||||
l.require(r"=")
|
||||
|
||||
expr = l.delimited_python(",)")
|
||||
|
||||
if not expr:
|
||||
l.error("expected expression.")
|
||||
|
||||
parameters[pname] = expr
|
||||
|
||||
if not l.match(r','):
|
||||
break
|
||||
|
||||
l.require(r'\)')
|
||||
l.expect_eol()
|
||||
|
||||
return dict(name=name, parameters=parameters)
|
||||
|
||||
def parse_hide_screen(l):
|
||||
name = l.require(l.name)
|
||||
|
||||
l.expect_eol()
|
||||
|
||||
return dict(name=name)
|
||||
|
||||
def predict_screen(p):
|
||||
if not p["parameters"]:
|
||||
renpy.predict_screen(p["name"])
|
||||
|
||||
def execute_show_screen(p):
|
||||
|
||||
name = p["name"]
|
||||
parameters = p["parameters"]
|
||||
|
||||
kwargs = { }
|
||||
|
||||
for k, v in parameters.iteritems():
|
||||
kwargs[k] = eval(v)
|
||||
|
||||
renpy.show_screen(name, **kwargs)
|
||||
|
||||
def execute_call_screen(p):
|
||||
name = p["name"]
|
||||
parameters = p["parameters"]
|
||||
|
||||
kwargs = { }
|
||||
|
||||
for k, v in parameters.iteritems():
|
||||
kwargs[str(k)] = eval(v)
|
||||
|
||||
store._return = renpy.call_screen(name, **kwargs)
|
||||
|
||||
def execute_hide_screen(p):
|
||||
name = p["name"]
|
||||
renpy.hide_screen(name)
|
||||
|
||||
def lint_screen(p):
|
||||
name = p["name"]
|
||||
if not renpy.has_screen(name):
|
||||
renpy.error("Screen %s does not exist." % name)
|
||||
|
||||
|
||||
renpy.statements.register("show screen",
|
||||
parse=parse_show_call_screen,
|
||||
execute=execute_show_screen,
|
||||
predict=predict_screen,
|
||||
lint=lint_screen)
|
||||
|
||||
renpy.statements.register("call screen",
|
||||
parse=parse_show_call_screen,
|
||||
execute=execute_call_screen,
|
||||
predict=predict_screen,
|
||||
lint=lint_screen)
|
||||
|
||||
renpy.statements.register("hide screen",
|
||||
parse=parse_hide_screen,
|
||||
execute=execute_hide_screen)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Copyright 2004-2008 PyTom
|
||||
#
|
||||
# Please see the LICENSE.txt distributed with Ren'Py for permission to
|
||||
# copy and modify.
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file is responsible for creating and defining the default styles
|
||||
# used by the system.
|
||||
@@ -24,15 +22,20 @@ init -1200 python hide:
|
||||
# Style Declarations #################################################
|
||||
|
||||
style.default = Style(None, help='root of style hierarchy')
|
||||
style.text = Style(style.default, help='style of text')
|
||||
|
||||
style.fixed = Style(style.default, help='fixed layouts')
|
||||
style.hbox = Style(style.default, help='horizontal boxes')
|
||||
style.vbox = Style(style.default, help='vertical boxes')
|
||||
|
||||
style.grid = Style(style.default, help='grid layouts')
|
||||
style.side = Style(style.default, help='side layouts')
|
||||
|
||||
style.window = Style(style.default, help='windows created with ui.window')
|
||||
|
||||
style.image_placement = Style(style.default, help='default placement of images on the screen')
|
||||
style.image = Style(style.default, help="default style of images")
|
||||
|
||||
style.motion = Style(style.default, help="default style of motions and zooms.")
|
||||
style.animation = Style(style.default, help="default style of animations.")
|
||||
|
||||
style.say_label = Style(style.default, help='the name of the character speaking dialogue.')
|
||||
@@ -51,7 +54,8 @@ init -1200 python hide:
|
||||
style.menu_choice_chosen_button = Style(style.menu_choice_button, help='buttons containing chosen in-game menu choices')
|
||||
style.menu_window = Style(style.window, help='a window containing a menu')
|
||||
|
||||
style.input_text = Style(style.default, help='text of an input box')
|
||||
style.input = Style(style.default, help='style of an input control')
|
||||
style.input_text = Style(style.input, help='text of an input box')
|
||||
style.input_prompt = Style(style.default, help='prompt of an input box')
|
||||
style.input_window = Style(style.window, help='window of an input box')
|
||||
|
||||
@@ -59,15 +63,19 @@ init -1200 python hide:
|
||||
style.centered_text = Style(style.default, help='centered text')
|
||||
|
||||
style.imagemap = Style(style.image_placement, help='default style of imagemaps')
|
||||
style.imagemap_button = Style(style.default, help='default style of buttons inside imagemaps')
|
||||
|
||||
style.hotspot = Style(style.default, help='default style of hotspots inside imagemaps')
|
||||
style.hotbar = Style(style.default, help='default style of hotbars inside imagemaps')
|
||||
style.imagemap_button = style.hotspot
|
||||
|
||||
style.image_button = Style(style.default, help='default style of image buttons')
|
||||
style.image_button_image = Style(style.default, help='default style of images inside image buttons')
|
||||
|
||||
style.hyperlink = Style(style.default, help=None) # ignored
|
||||
style.hyperlink_text = Style(style.default, help='hyperlinked text')
|
||||
style.ruby_text = Style(style.default, help='ruby text')
|
||||
|
||||
style.viewport = Style(style.default, help='default style of viewports')
|
||||
style.transform = Style(style.motion, help='default style of transforms')
|
||||
|
||||
style.list = Style(style.default)
|
||||
style.list_box = Style(style.vbox)
|
||||
@@ -76,6 +84,8 @@ init -1200 python hide:
|
||||
style.list_spacer = Style(style.default)
|
||||
style.list_text = Style(style.default)
|
||||
|
||||
style.tile = Style(style.default, help='default style of tile')
|
||||
|
||||
# The base styles that can be customized by themes.
|
||||
|
||||
style.frame = Style(style.default, help='base style for frames.')
|
||||
@@ -121,7 +131,7 @@ init -1090 python:
|
||||
|
||||
# Text properties.
|
||||
style.default.font = "DejaVuSans.ttf"
|
||||
style.default.language = "western"
|
||||
style.default.language = "unicode"
|
||||
style.default.antialias = True
|
||||
style.default.size = 22
|
||||
style.default.color = (255, 255, 255, 255)
|
||||
@@ -130,19 +140,25 @@ init -1090 python:
|
||||
style.default.italic = False
|
||||
style.default.underline = False
|
||||
style.default.strikethrough = False
|
||||
style.default.kerning = 0.0
|
||||
style.default.drop_shadow = None
|
||||
style.default.drop_shadow_color = (0, 0, 0, 255)
|
||||
style.default.outlines = [ ]
|
||||
style.default.minwidth = 0
|
||||
style.default.textalign = 0
|
||||
style.default.text_align = 0
|
||||
style.default.justify = False
|
||||
style.default.text_y_fudge = 0
|
||||
style.default.first_indent = 0
|
||||
style.default.rest_indent = 0
|
||||
style.default.line_spacing = 0
|
||||
style.default.layout = "greedy"
|
||||
style.default.line_leading = 0
|
||||
style.default.line_overlap_split = 0
|
||||
style.default.layout = "tex"
|
||||
style.default.subtitle_width = 0.9
|
||||
style.default.slow_cps = None
|
||||
style.default.slow_cps_multiplier = 1.0
|
||||
style.default.slow_abortable = False
|
||||
# style.default.hyperlink_functions (set in 00library.rpy)
|
||||
|
||||
# Window properties.
|
||||
style.default.background = None
|
||||
@@ -164,7 +180,8 @@ init -1090 python:
|
||||
style.default.ymaximum = None
|
||||
style.default.xoffset = 0
|
||||
style.default.yoffset = 0
|
||||
|
||||
style.default.subpixel = False
|
||||
|
||||
# Sound properties.
|
||||
style.default.sound = None
|
||||
|
||||
@@ -172,6 +189,7 @@ init -1090 python:
|
||||
style.default.spacing = 0
|
||||
style.default.first_spacing = None
|
||||
style.default.box_layout = None
|
||||
style.default.box_wrap = False
|
||||
|
||||
# Focus properties.
|
||||
style.default.focus_mask = None
|
||||
@@ -185,6 +203,7 @@ init -1090 python:
|
||||
style.default.left_gutter = 0
|
||||
style.default.right_gutter = 0
|
||||
style.default.thumb_offset = 0
|
||||
style.default.unscrollable = None
|
||||
|
||||
# Misc.
|
||||
style.default.activate_sound = None
|
||||
@@ -194,6 +213,12 @@ init -1090 python:
|
||||
style.hbox.box_layout = 'horizontal'
|
||||
style.vbox.box_layout = 'vertical'
|
||||
|
||||
# Motions, zooms, rotozooms, and transforms.
|
||||
style.motion.xanchor = 0
|
||||
style.motion.yanchor = 0
|
||||
style.motion.xpos = 0
|
||||
style.motion.ypos = 0
|
||||
|
||||
# Windows.
|
||||
style.window.background = Solid((0, 0, 0, 192))
|
||||
style.window.xpadding = 6
|
||||
@@ -203,16 +228,9 @@ init -1090 python:
|
||||
style.window.xfill = True
|
||||
style.window.yfill = False
|
||||
style.window.yminimum = 150 # Includes margins and padding.
|
||||
|
||||
style.window.xalign = 0.5
|
||||
style.window.yalign = 1.0
|
||||
|
||||
# Image placement.
|
||||
style.image_placement.xpos = 0.5
|
||||
style.image_placement.ypos = 1.0
|
||||
style.image_placement.xanchor = 0.5
|
||||
style.image_placement.yanchor = 1.0
|
||||
|
||||
# Dialogue
|
||||
style.say_label.bold = True
|
||||
style.say_vbox.spacing = 8
|
||||
@@ -228,7 +246,7 @@ init -1090 python:
|
||||
# Menus.
|
||||
style.menu_choice.idle_color = "#0ff"
|
||||
style.menu_choice.hover_color = "#ff0"
|
||||
style.input_text.color = "#ff0"
|
||||
style.input.color = "#ff0"
|
||||
|
||||
# Styles used by centered.
|
||||
style.centered_window.xalign = 0.5
|
||||
@@ -247,6 +265,11 @@ init -1090 python:
|
||||
style.hyperlink_text.hover_color = "#0ff"
|
||||
style.hyperlink_text.idle_color = "#08f"
|
||||
|
||||
# Ruby.
|
||||
style.ruby_text.size = 22
|
||||
style.ruby_text.xoffset = 0
|
||||
style.default.ruby_style = style.ruby_text
|
||||
|
||||
# Bars.
|
||||
style.default.bar_invert = False
|
||||
style.default.bar_resizing = False
|
||||
@@ -260,6 +283,9 @@ init -1090 python:
|
||||
# Viewport
|
||||
style.viewport.clipping = True
|
||||
|
||||
# Transform
|
||||
style.transform.subpixel = True
|
||||
|
||||
# Menu windows.
|
||||
style.mm_root.background = "#000"
|
||||
style.mm_root.xfill = True
|
||||
@@ -282,7 +308,10 @@ init -1090 python:
|
||||
style.list_text.color = "#000"
|
||||
style.list_text.size = 14
|
||||
style.list_spacer.xminimum = 15
|
||||
|
||||
|
||||
# Tile
|
||||
style.tile.clipping = True
|
||||
|
||||
|
||||
######################################################################
|
||||
|
||||
@@ -296,3 +325,4 @@ init -1090 python:
|
||||
style.error_title.color = (255, 128, 128, 255)
|
||||
style.error_body.color = (128, 128, 255, 255)
|
||||
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains code for the style preferences system, which allows
|
||||
# the user to define preferences that update styles.
|
||||
|
||||
init -1135 python:
|
||||
|
||||
# A map from preference name to list of (alternative, style, property, value)
|
||||
# tuples.
|
||||
__preferences = { }
|
||||
|
||||
# A map from preference name to the list of alternatives for that preference.
|
||||
__alternatives = { }
|
||||
|
||||
# Are style preferences dirty? If so, we need to update them at the start of
|
||||
# the next operation.
|
||||
__dirty = True
|
||||
|
||||
# A map from preference name to alternative.
|
||||
if persistent._style_preferences is None:
|
||||
persistent._style_preferences = { }
|
||||
|
||||
|
||||
def __register_style_preference(preference, alternative, style, property, value):
|
||||
"""
|
||||
:doc: style_preferences
|
||||
:name: renpy.register_style_preference
|
||||
|
||||
Registers information about an alternative for a style preference.
|
||||
|
||||
`preference`
|
||||
A string, the name of the style property.
|
||||
|
||||
`alternative`
|
||||
A string, the name of the alternative.
|
||||
|
||||
`style`
|
||||
The style that will be updated. This may be a style object or a string giving the style name.
|
||||
|
||||
`property`
|
||||
A string giving the name of the style property that will be update.
|
||||
|
||||
`value`
|
||||
The value that will be assigned to the style property.
|
||||
"""
|
||||
|
||||
if preference not in __preferences:
|
||||
__preferences[preference] = [ ]
|
||||
__alternatives[preference] = [ ]
|
||||
|
||||
if alternative not in __alternatives:
|
||||
__alternatives[preference].append(alternative)
|
||||
|
||||
__preferences[preference].append((alternative, style, property, value))
|
||||
|
||||
def __init():
|
||||
"""
|
||||
Called at the end of the init phase, to ensure that each preference
|
||||
has a valid value.
|
||||
"""
|
||||
|
||||
for preference, alternatives in __alternatives.iteritems():
|
||||
alt = persistent._style_preferences.get(preference, None)
|
||||
|
||||
if alt not in alternatives:
|
||||
persistent._style_preferences[preference] = alternatives[0]
|
||||
|
||||
def __update():
|
||||
"""
|
||||
Called at least once per interaction, to update the styles if necessary.
|
||||
"""
|
||||
|
||||
global __dirty
|
||||
|
||||
if not __dirty:
|
||||
return
|
||||
|
||||
for preference, alternatives in __preferences.iteritems():
|
||||
|
||||
alt = persistent._style_preferences.get(preference, None)
|
||||
|
||||
for alternative, style, property, value in alternatives:
|
||||
if alternative == alt:
|
||||
setattr(style, property, value)
|
||||
|
||||
renpy.style.rebuild()
|
||||
|
||||
__dirty = False
|
||||
|
||||
def __check(preference, alternative=None):
|
||||
|
||||
if preference not in __alternatives:
|
||||
raise Exception("{0} is not a known style preference.".format(preference))
|
||||
|
||||
if alternative is not None:
|
||||
if alternative not in __alternatives[preference]:
|
||||
raise Exception("{0} is not a known alternative for style preference {1}.".format(alternative, preference))
|
||||
|
||||
|
||||
def __set_style_preference(preference, alternative):
|
||||
"""
|
||||
:doc: style_preferences
|
||||
:name: renpy.set_style_preference
|
||||
|
||||
Sets the selected alternative for the style preference.
|
||||
|
||||
`preference`
|
||||
A string giving the name of the style preference.
|
||||
|
||||
`alternative`
|
||||
A string giving the name of the alternative.
|
||||
"""
|
||||
|
||||
global __dirty
|
||||
|
||||
__check(preference, alternative)
|
||||
|
||||
persistent._style_preferences[preference] = alternative
|
||||
__dirty = True
|
||||
|
||||
renpy.restart_interaction()
|
||||
|
||||
def __get_style_preference(preference):
|
||||
"""
|
||||
:doc: style_preferences
|
||||
:name: renpy.get_style_preference
|
||||
|
||||
Returns a string giving the name of the selected alternative for the named style preference.
|
||||
|
||||
`preference`
|
||||
A string giving the name of the style preference.
|
||||
"""
|
||||
|
||||
__check(preference)
|
||||
|
||||
return persistent._style_preferences[preference]
|
||||
|
||||
class StylePreference(Action):
|
||||
"""
|
||||
:doc: style_preferences
|
||||
|
||||
An action that causes `alternative` to become the selected alternative for the given style preference.
|
||||
|
||||
`preference`
|
||||
A string giving the name of the style preference.
|
||||
|
||||
`alternative`
|
||||
A string giving the name of the alternative.
|
||||
"""
|
||||
|
||||
def __init__(self, preference, alternative):
|
||||
|
||||
__check(preference, alternative)
|
||||
|
||||
self.preference = preference
|
||||
self.alternative = alternative
|
||||
|
||||
def __call__(self):
|
||||
__set_style_preference(self.preference, self.alternative)
|
||||
|
||||
def get_selected(self):
|
||||
return __get_style_preference(self.preference) == self.alternative
|
||||
|
||||
renpy.register_style_preference = __register_style_preference
|
||||
renpy.set_style_preference = __set_style_preference
|
||||
renpy.get_style_preference = __get_style_preference
|
||||
|
||||
config.interact_callbacks.append(__update)
|
||||
|
||||
init 1135 python:
|
||||
|
||||
__init()
|
||||
@@ -1,7 +1,5 @@
|
||||
# Copyright 2004-2008 PyTom
|
||||
#
|
||||
# Please see the LICENSE.txt distributed with Ren'Py for permission to
|
||||
# copy and modify.
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1110 python:
|
||||
|
||||
@@ -73,9 +71,7 @@ init -1110 python hide:
|
||||
style.vscrollbar.bar_vertical = True
|
||||
style.vscrollbar.bar_invert = True
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# This recolors the given image using one or two colors.
|
||||
@theme
|
||||
def OneOrTwoColor(image, color):
|
||||
@@ -84,300 +80,333 @@ init -1110 python hide:
|
||||
else:
|
||||
return im.Twocolor(image, color, color)
|
||||
|
||||
@theme
|
||||
def roundrect_frames(
|
||||
less_rounded,
|
||||
frame):
|
||||
def roundrect_based_theme(name, file_prefix, Box=None, frame_png=None):
|
||||
|
||||
theme.clear_frames()
|
||||
|
||||
style.frame.background = RoundRect(frame, less_rounded)
|
||||
if Box is None:
|
||||
def Box(color, ignored):
|
||||
return Frame(theme.OneOrTwoColor(file_prefix + "_box.png", color), 12, 12)
|
||||
|
||||
style.frame.xpadding = 6
|
||||
style.frame.ypadding = 6
|
||||
|
||||
|
||||
@theme
|
||||
def roundrect_buttons(text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text):
|
||||
|
||||
theme.clear_buttons()
|
||||
|
||||
style.button.background = RoundRect(widget, less_rounded)
|
||||
style.button.hover_background = RoundRect(widget_hover, less_rounded)
|
||||
style.button.insensitive_background = RoundRect(disabled, less_rounded)
|
||||
|
||||
style.button_text.size = text_size
|
||||
style.button_text.color = widget_text
|
||||
style.button_text.selected_color = widget_selected
|
||||
style.button_text.insensitive_color = disabled_text
|
||||
|
||||
if less_rounded:
|
||||
style.button.xpadding = 6
|
||||
if frame_png is not None:
|
||||
def FrameBox(color, ignored):
|
||||
return Frame(theme.OneOrTwoColor(file_prefix + frame_png, color), 12, 12)
|
||||
else:
|
||||
style.button.xpadding = 12
|
||||
|
||||
style.button.ypadding = 1
|
||||
style.button.xmargin = 1
|
||||
style.button.ymargin = 1
|
||||
|
||||
style.button_text.xalign = 0.5
|
||||
style.button_text.yalign = 0.5
|
||||
style.button_text.text_align = 0.5
|
||||
|
||||
@theme
|
||||
def roundrect_large_buttons(
|
||||
text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text):
|
||||
|
||||
theme.clear_large_buttons()
|
||||
|
||||
if less_rounded:
|
||||
style.large_button.xpadding = 6
|
||||
else:
|
||||
style.large_button.xpadding = 12
|
||||
|
||||
style.large_button.ypadding = 1
|
||||
style.large_button.xmargin = 1
|
||||
style.large_button.ymargin = 1
|
||||
|
||||
style.large_button.background = RoundRect(widget, less_rounded)
|
||||
style.large_button.hover_background = RoundRect(widget_hover, less_rounded)
|
||||
style.large_button.insensitive_background = RoundRect(disabled, less_rounded)
|
||||
|
||||
style.large_button_text.size = text_size
|
||||
style.large_button_text.color = widget_text
|
||||
style.large_button_text.selected_color = widget_selected
|
||||
style.large_button_text.insensitive_color = disabled_text
|
||||
|
||||
style.large_button_text.xalign = 0
|
||||
style.large_button_text.yalign = 0
|
||||
|
||||
@theme
|
||||
def roundrect_labels(
|
||||
text_size,
|
||||
label):
|
||||
|
||||
theme.clear_labels()
|
||||
|
||||
style.label_text.size = text_size
|
||||
style.label_text.color = label
|
||||
|
||||
@theme
|
||||
def roundrect_prompts(
|
||||
text_size,
|
||||
label):
|
||||
|
||||
theme.clear_prompts()
|
||||
|
||||
style.prompt_text.size = text_size
|
||||
style.prompt_text.color = label
|
||||
|
||||
style.prompt.xalign = 0.5
|
||||
style.prompt_text.text_align = 0.5
|
||||
style.prompt_text.layout = "subtitle"
|
||||
|
||||
@theme
|
||||
def roundrect_bars(
|
||||
widget,
|
||||
widget_hover):
|
||||
|
||||
theme.clear_bars()
|
||||
|
||||
def img(name, color, x, y):
|
||||
rv = theme.OneOrTwoColor("_roundrect/" + name + ".png", color)
|
||||
if x is not None:
|
||||
rv = Frame(rv, x, y)
|
||||
return rv
|
||||
|
||||
# Bars.
|
||||
style.bar.ymaximum = 24
|
||||
style.bar.left_gutter = 6
|
||||
style.bar.right_gutter = 6
|
||||
style.bar.thumb_offset = 6
|
||||
|
||||
style.bar.left_bar = img("rrslider_full", widget, 12, 0)
|
||||
style.bar.right_bar = img("rrslider_empty", widget, 12, 0)
|
||||
style.bar.thumb = img("rrslider_thumb", widget, None, None)
|
||||
style.bar.hover_left_bar = img("rrslider_full", widget_hover, 12, 0)
|
||||
style.bar.hover_right_bar = img("rrslider_empty", widget_hover, 12, 0)
|
||||
style.bar.hover_thumb = img("rrslider_thumb", widget_hover, None, None)
|
||||
|
||||
style.vbar.xmaximum = 24
|
||||
style.vbar.top_gutter = 6
|
||||
style.vbar.bottom_gutter = 6
|
||||
style.vbar.thumb_offset = 6
|
||||
|
||||
style.vbar.bottom_bar = img("rrvslider_full", widget, 0, 12)
|
||||
style.vbar.top_bar = img("rrvslider_empty", widget, 0, 12)
|
||||
style.vbar.thumb = img("rrvslider_thumb", widget, None, None)
|
||||
style.vbar.hover_bottom_bar = img("rrvslider_full", widget_hover, 0, 12)
|
||||
style.vbar.hover_top_bar = img("rrvslider_empty", widget_hover, 0, 12)
|
||||
style.vbar.hover_thumb = img("rrvslider_thumb", widget_hover, None, None)
|
||||
|
||||
# Sliders.
|
||||
style.slider.ymaximum = 24
|
||||
style.slider.left_gutter = 6
|
||||
style.slider.right_gutter = 6
|
||||
style.slider.thumb_offset = 6
|
||||
|
||||
style.slider.left_bar = img("rrslider_full", widget, 12, 0)
|
||||
style.slider.right_bar = img("rrslider_empty", widget, 12, 0)
|
||||
style.slider.thumb = img("rrslider_thumb", widget, None, None)
|
||||
style.slider.hover_left_bar = img("rrslider_full", widget_hover, 12, 0)
|
||||
style.slider.hover_right_bar = img("rrslider_empty", widget_hover, 12, 0)
|
||||
style.slider.hover_thumb = img("rrslider_thumb", widget_hover, None, None)
|
||||
|
||||
style.vslider.xmaximum = 24
|
||||
style.vslider.top_gutter = 6
|
||||
style.vslider.bottom_gutter = 6
|
||||
style.vslider.thumb_offset = 6
|
||||
|
||||
style.vslider.bottom_bar = img("rrvslider_full", widget, 0, 12)
|
||||
style.vslider.top_bar = img("rrvslider_empty", widget, 0, 12)
|
||||
style.vslider.thumb = img("rrvslider_thumb", widget, None, None)
|
||||
style.vslider.hover_bottom_bar = img("rrvslider_full", widget_hover, 0, 12)
|
||||
style.vslider.hover_top_bar = img("rrvslider_empty", widget_hover, 0, 12)
|
||||
style.vslider.hover_thumb = img("rrvslider_thumb", widget_hover, None, None)
|
||||
|
||||
|
||||
# Scrollbars.
|
||||
style.scrollbar.left_gutter = 6
|
||||
style.scrollbar.right_gutter = 6
|
||||
style.scrollbar.thumb_offset = 6
|
||||
style.scrollbar.ymaximum = 12
|
||||
|
||||
style.scrollbar.left_bar = img("rrscrollbar", widget, 12, 0)
|
||||
style.scrollbar.right_bar = img("rrscrollbar", widget, 12, 0)
|
||||
style.scrollbar.thumb = img("rrscrollbar_thumb", widget, None, None)
|
||||
style.scrollbar.hover_left_bar = img("rrscrollbar", widget_hover, 12, 0)
|
||||
style.scrollbar.hover_right_bar = img("rrscrollbar", widget_hover, 12, 0)
|
||||
style.scrollbar.hover_thumb = img("rrscrollbar_thumb", widget_hover, None, None)
|
||||
|
||||
style.vscrollbar.top_gutter = 6
|
||||
style.vscrollbar.bottom_gutter = 6
|
||||
style.vscrollbar.thumb_offset = 6
|
||||
style.vscrollbar.xmaximum = 12
|
||||
|
||||
style.vscrollbar.left_bar = img("rrvscrollbar", widget, 0, 12)
|
||||
style.vscrollbar.right_bar = img("rrvscrollbar", widget, 0, 12)
|
||||
style.vscrollbar.thumb = img("rrvscrollbar_thumb", widget, None, None)
|
||||
style.vscrollbar.hover_left_bar = img("rrvscrollbar", widget_hover, 0, 12)
|
||||
style.vscrollbar.hover_right_bar = img("rrvscrollbar", widget_hover, 0, 12)
|
||||
style.vscrollbar.hover_thumb = img("rrvscrollbar_thumb", widget_hover, None, None)
|
||||
|
||||
@theme
|
||||
def roundrect(
|
||||
widget = (0, 60, 120, 255),
|
||||
widget_hover = (0, 80, 160, 255),
|
||||
widget_text = (200, 225, 255, 255),
|
||||
widget_selected = (255, 255, 200, 255),
|
||||
disabled = (64, 64, 64, 255),
|
||||
disabled_text = (200, 200, 200, 255),
|
||||
label = (255, 255, 255, 255),
|
||||
frame = (100, 150, 200, 255),
|
||||
window = (0, 0, 0, 192),
|
||||
mm_root = Solid((220, 235, 255, 255)),
|
||||
gm_root = Solid((220, 235, 255, 255)),
|
||||
|
||||
text_size=None,
|
||||
small_text_size=None,
|
||||
less_rounded = False,
|
||||
|
||||
# Compat for the old roundrect theme.
|
||||
window = None,
|
||||
button_menu = True,
|
||||
rounded_window = True,
|
||||
outline_bars = False,
|
||||
|
||||
mm_root = None,
|
||||
gm_root = None):
|
||||
|
||||
layout.defaults()
|
||||
|
||||
if config.screen_width <= 640:
|
||||
text_size = text_size or 18
|
||||
small_text_size = small_text_size or 12
|
||||
less_rounded = True
|
||||
FrameBox = Box
|
||||
|
||||
else:
|
||||
text_size = text_size or 22
|
||||
small_text_size = small_text_size or 16
|
||||
radius = 12
|
||||
|
||||
theme.roundrect_frames(
|
||||
def frames(
|
||||
less_rounded,
|
||||
frame)
|
||||
frame):
|
||||
|
||||
theme.roundrect_buttons(
|
||||
text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text)
|
||||
theme.clear_frames()
|
||||
|
||||
theme.roundrect_large_buttons(
|
||||
small_text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text)
|
||||
style.frame.background = Box(frame, less_rounded)
|
||||
|
||||
theme.roundrect_labels(
|
||||
text_size,
|
||||
label)
|
||||
style.frame.xpadding = 6
|
||||
style.frame.ypadding = 6
|
||||
|
||||
setattr(theme, name + "_frames", frames)
|
||||
|
||||
theme.roundrect_prompts(
|
||||
text_size,
|
||||
label)
|
||||
|
||||
theme.roundrect_bars(
|
||||
widget,
|
||||
widget_hover)
|
||||
|
||||
if mm_root is not None:
|
||||
style.mm_root.background = mm_root
|
||||
def buttons(text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text):
|
||||
|
||||
if gm_root is not None:
|
||||
style.gm_root.background = gm_root
|
||||
|
||||
if window is not None:
|
||||
theme.clear_buttons()
|
||||
|
||||
if rounded_window:
|
||||
style.window.background = RoundRect(window, less_rounded)
|
||||
style.window.xpadding = 6
|
||||
style.window.xmargin = 6
|
||||
style.window.ypadding = 6
|
||||
style.window.ymargin = 6
|
||||
style.button.background = Box(widget, less_rounded)
|
||||
style.button.hover_background = Box(widget_hover, less_rounded)
|
||||
style.button.insensitive_background = Box(disabled, less_rounded)
|
||||
|
||||
style.button_text.size = text_size
|
||||
style.button_text.color = widget_text
|
||||
style.button_text.selected_color = widget_selected
|
||||
style.button_text.insensitive_color = disabled_text
|
||||
|
||||
if less_rounded:
|
||||
style.button.xpadding = 6
|
||||
else:
|
||||
style.window.background = Solid(window)
|
||||
style.window.xpadding = 6
|
||||
style.window.xmargin = 0
|
||||
style.window.ypadding = 6
|
||||
style.window.ymargin = 0
|
||||
style.button.xpadding = 12
|
||||
|
||||
style.button.ypadding = 1
|
||||
style.button.xmargin = 1
|
||||
style.button.ymargin = 1
|
||||
|
||||
style.button_text.xalign = 0.5
|
||||
style.button_text.yalign = 0.5
|
||||
style.button_text.text_align = 0.5
|
||||
|
||||
setattr(theme, name + "_buttons", buttons)
|
||||
|
||||
def large_buttons(
|
||||
text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text):
|
||||
|
||||
theme.clear_large_buttons()
|
||||
|
||||
if less_rounded:
|
||||
style.large_button.xpadding = 6
|
||||
else:
|
||||
style.large_button.xpadding = 12
|
||||
|
||||
style.large_button.ypadding = 1
|
||||
style.large_button.xmargin = 1
|
||||
style.large_button.ymargin = 1
|
||||
|
||||
style.large_button.background = Box(widget, less_rounded)
|
||||
style.large_button.hover_background = Box(widget_hover, less_rounded)
|
||||
style.large_button.insensitive_background = Box(disabled, less_rounded)
|
||||
|
||||
style.large_button_text.size = text_size
|
||||
style.large_button_text.color = widget_text
|
||||
style.large_button_text.selected_color = widget_selected
|
||||
style.large_button_text.insensitive_color = disabled_text
|
||||
|
||||
style.large_button_text.xalign = 0
|
||||
style.large_button_text.yalign = 0
|
||||
|
||||
setattr(theme, name + "_large_buttons", large_buttons)
|
||||
|
||||
def labels(
|
||||
text_size,
|
||||
label):
|
||||
|
||||
theme.clear_labels()
|
||||
|
||||
style.label_text.size = text_size
|
||||
style.label_text.color = label
|
||||
|
||||
setattr(theme, name + "_labels", labels)
|
||||
|
||||
def prompts(
|
||||
text_size,
|
||||
label):
|
||||
|
||||
theme.clear_prompts()
|
||||
|
||||
style.prompt_text.size = text_size
|
||||
style.prompt_text.color = label
|
||||
|
||||
style.prompt.xalign = 0.5
|
||||
style.prompt_text.text_align = 0.5
|
||||
style.prompt_text.layout = "subtitle"
|
||||
|
||||
setattr(theme, name + "_prompts", prompts)
|
||||
|
||||
|
||||
def bars(
|
||||
widget,
|
||||
widget_hover):
|
||||
|
||||
theme.clear_bars()
|
||||
|
||||
def img(name, color, x, y):
|
||||
rv = theme.OneOrTwoColor(file_prefix + name + ".png", color)
|
||||
if x is not None:
|
||||
rv = Frame(rv, x, y, tile=True)
|
||||
return rv
|
||||
|
||||
# Bars.
|
||||
style.bar.ymaximum = 24
|
||||
style.bar.left_gutter = 6
|
||||
style.bar.right_gutter = 6
|
||||
style.bar.thumb_offset = 6
|
||||
|
||||
style.bar.left_bar = img("slider_full", widget, 12, 0)
|
||||
style.bar.right_bar = img("slider_empty", widget, 12, 0)
|
||||
style.bar.thumb = img("slider_thumb", widget, None, None)
|
||||
style.bar.hover_left_bar = img("slider_full", widget_hover, 12, 0)
|
||||
style.bar.hover_right_bar = img("slider_empty", widget_hover, 12, 0)
|
||||
style.bar.hover_thumb = img("slider_thumb", widget_hover, None, None)
|
||||
|
||||
style.vbar.xmaximum = 24
|
||||
style.vbar.top_gutter = 6
|
||||
style.vbar.bottom_gutter = 6
|
||||
style.vbar.thumb_offset = 6
|
||||
|
||||
style.vbar.bottom_bar = img("vslider_full", widget, 0, 12)
|
||||
style.vbar.top_bar = img("vslider_empty", widget, 0, 12)
|
||||
style.vbar.thumb = img("vslider_thumb", widget, None, None)
|
||||
style.vbar.hover_bottom_bar = img("vslider_full", widget_hover, 0, 12)
|
||||
style.vbar.hover_top_bar = img("vslider_empty", widget_hover, 0, 12)
|
||||
style.vbar.hover_thumb = img("vslider_thumb", widget_hover, None, None)
|
||||
|
||||
# Sliders.
|
||||
style.slider.ymaximum = 24
|
||||
style.slider.left_gutter = 6
|
||||
style.slider.right_gutter = 6
|
||||
style.slider.thumb_offset = 6
|
||||
|
||||
style.slider.left_bar = img("slider_full", widget, 12, 0)
|
||||
style.slider.right_bar = img("slider_empty", widget, 12, 0)
|
||||
style.slider.thumb = img("slider_thumb", widget, None, None)
|
||||
style.slider.hover_left_bar = img("slider_full", widget_hover, 12, 0)
|
||||
style.slider.hover_right_bar = img("slider_empty", widget_hover, 12, 0)
|
||||
style.slider.hover_thumb = img("slider_thumb", widget_hover, None, None)
|
||||
|
||||
style.vslider.xmaximum = 24
|
||||
style.vslider.top_gutter = 6
|
||||
style.vslider.bottom_gutter = 6
|
||||
style.vslider.thumb_offset = 6
|
||||
|
||||
style.vslider.bottom_bar = img("vslider_full", widget, 0, 12)
|
||||
style.vslider.top_bar = img("vslider_empty", widget, 0, 12)
|
||||
style.vslider.thumb = img("vslider_thumb", widget, None, None)
|
||||
style.vslider.hover_bottom_bar = img("vslider_full", widget_hover, 0, 12)
|
||||
style.vslider.hover_top_bar = img("vslider_empty", widget_hover, 0, 12)
|
||||
style.vslider.hover_thumb = img("vslider_thumb", widget_hover, None, None)
|
||||
|
||||
|
||||
if button_menu:
|
||||
layout.button_menu()
|
||||
# Scrollbars.
|
||||
style.scrollbar.left_gutter = 6
|
||||
style.scrollbar.right_gutter = 6
|
||||
style.scrollbar.thumb_offset = 6
|
||||
style.scrollbar.ymaximum = 12
|
||||
|
||||
style.scrollbar.left_bar = img("scrollbar", widget, 12, 0)
|
||||
style.scrollbar.right_bar = img("scrollbar", widget, 12, 0)
|
||||
style.scrollbar.thumb = img("scrollbar_thumb", widget, None, None)
|
||||
style.scrollbar.hover_left_bar = img("scrollbar", widget_hover, 12, 0)
|
||||
style.scrollbar.hover_right_bar = img("scrollbar", widget_hover, 12, 0)
|
||||
style.scrollbar.hover_thumb = img("scrollbar_thumb", widget_hover, None, None)
|
||||
|
||||
style.vscrollbar.top_gutter = 6
|
||||
style.vscrollbar.bottom_gutter = 6
|
||||
style.vscrollbar.thumb_offset = 6
|
||||
style.vscrollbar.xmaximum = 12
|
||||
|
||||
style.vscrollbar.left_bar = img("vscrollbar", widget, 0, 12)
|
||||
style.vscrollbar.right_bar = img("vscrollbar", widget, 0, 12)
|
||||
style.vscrollbar.thumb = img("vscrollbar_thumb", widget, None, None)
|
||||
style.vscrollbar.hover_left_bar = img("vscrollbar", widget_hover, 0, 12)
|
||||
style.vscrollbar.hover_right_bar = img("vscrollbar", widget_hover, 0, 12)
|
||||
style.vscrollbar.hover_thumb = img("vscrollbar_thumb", widget_hover, None, None)
|
||||
|
||||
setattr(theme, name + "_bars", bars)
|
||||
|
||||
def main(
|
||||
widget = (0, 60, 120, 255),
|
||||
widget_hover = (0, 80, 160, 255),
|
||||
widget_text = (200, 225, 255, 255),
|
||||
widget_selected = (255, 255, 200, 255),
|
||||
disabled = (64, 64, 64, 255),
|
||||
disabled_text = (200, 200, 200, 255),
|
||||
label = (255, 255, 255, 255),
|
||||
frame = (100, 150, 200, 255),
|
||||
|
||||
text_size=None,
|
||||
small_text_size=None,
|
||||
less_rounded = False,
|
||||
|
||||
# Compat for the old roundrect theme.
|
||||
window = None,
|
||||
button_menu = None,
|
||||
rounded_window = True,
|
||||
outline_bars = False,
|
||||
mm_root = None,
|
||||
gm_root = None):
|
||||
|
||||
if button_menu is None:
|
||||
if (config.script_version is not None) and (config.script_version < (6, 9, 0)):
|
||||
button_menu = True
|
||||
else:
|
||||
button_menu = False
|
||||
|
||||
layout.defaults()
|
||||
|
||||
if config.screen_width <= 640:
|
||||
text_size = text_size or 18
|
||||
small_text_size = small_text_size or 12
|
||||
less_rounded = True
|
||||
|
||||
else:
|
||||
text_size = text_size or 22
|
||||
small_text_size = small_text_size or 16
|
||||
radius = 12
|
||||
|
||||
frames(
|
||||
less_rounded,
|
||||
frame)
|
||||
|
||||
buttons(
|
||||
text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text)
|
||||
|
||||
large_buttons(
|
||||
small_text_size,
|
||||
less_rounded,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text)
|
||||
|
||||
labels(
|
||||
text_size,
|
||||
label)
|
||||
|
||||
prompts(
|
||||
text_size,
|
||||
label)
|
||||
|
||||
bars(
|
||||
widget,
|
||||
widget_hover)
|
||||
|
||||
if mm_root is not None:
|
||||
style.mm_root.background = mm_root
|
||||
|
||||
if gm_root is not None:
|
||||
style.gm_root.background = gm_root
|
||||
|
||||
if window is not None:
|
||||
|
||||
if rounded_window:
|
||||
style.window.background = RoundRect(window, less_rounded)
|
||||
style.window.xpadding = 6
|
||||
style.window.xmargin = 6
|
||||
style.window.ypadding = 6
|
||||
style.window.ymargin = 6
|
||||
else:
|
||||
style.window.background = Solid(window)
|
||||
style.window.xpadding = 6
|
||||
style.window.xmargin = 0
|
||||
style.window.ypadding = 6
|
||||
style.window.ymargin = 0
|
||||
|
||||
|
||||
if button_menu:
|
||||
layout.button_menu()
|
||||
|
||||
setattr(theme, name, main)
|
||||
|
||||
roundrect_based_theme("roundrect", "_roundrect/rr", RoundRect)
|
||||
roundrect_based_theme("bordered", "_theme_bordered/br")
|
||||
roundrect_based_theme("diamond", "_theme_diamond/d")
|
||||
roundrect_based_theme("tv", "_theme_tv/t")
|
||||
roundrect_based_theme("glow", "_theme_glow/g", None, "_outline.png")
|
||||
roundrect_based_theme("regal", "_theme_regal/re")
|
||||
roundrect_based_theme("crayon", "_theme_crayon/cry")
|
||||
roundrect_based_theme("threeD", "_theme_threeD/th")
|
||||
roundrect_based_theme("marker", "_theme_marker/ink")
|
||||
roundrect_based_theme("austen", "_theme_austen/au")
|
||||
|
||||
@theme
|
||||
def ancient():
|
||||
|
||||
@@ -480,14 +509,6 @@ init -1110 python hide:
|
||||
style.gm_root.background = "#e9d8bc"
|
||||
|
||||
|
||||
theme.outline_drop_shadow = [
|
||||
(0, -2),
|
||||
(-1, -1), (0, -1), (1, -1),
|
||||
(-2, 0), (-1, 0), (1, 0), (2, 0),
|
||||
(-1, 1), (0, 1), (1, 1),
|
||||
(0, 2)
|
||||
]
|
||||
|
||||
@theme
|
||||
def outline_frames():
|
||||
theme.clear_frames()
|
||||
@@ -507,12 +528,11 @@ init -1110 python hide:
|
||||
|
||||
style.button_text.size = text_size
|
||||
style.button_text.color = inside
|
||||
style.button_text.drop_shadow = theme.outline_drop_shadow
|
||||
style.button_text.drop_shadow_color = idle
|
||||
style.button_text.hover_drop_shadow_color = hover
|
||||
style.button_text.selected_drop_shadow_color = selected
|
||||
style.button_text.selected_hover_drop_shadow_color = hover
|
||||
style.button_text.insensitive_drop_shadow_color = insensitive
|
||||
style.button_text.outlines = [ (2, idle) ]
|
||||
style.button_text.hover_outlines = [ (2, hover) ]
|
||||
style.button_text.selected_outlines = [ (2, selected) ]
|
||||
style.button_text.selected_hover_outlines = [ (2, hover) ]
|
||||
style.button_text.insensitive_outlines = [ (2, insensitive) ]
|
||||
|
||||
|
||||
@theme
|
||||
@@ -534,12 +554,12 @@ init -1110 python hide:
|
||||
|
||||
style.large_button_text.size = text_size
|
||||
style.large_button_text.color = inside
|
||||
style.large_button_text.drop_shadow = theme.outline_drop_shadow
|
||||
style.large_button_text.drop_shadow_color = idle
|
||||
style.large_button_text.hover_drop_shadow_color = hover
|
||||
style.large_button_text.selected_drop_shadow_color = selected
|
||||
style.large_button_text.selected_hover_drop_shadow_color = hover
|
||||
style.large_button_text.insensitive_drop_shadow_color = insensitive
|
||||
|
||||
style.large_button_text.outlines = [ (2, idle) ]
|
||||
style.large_button_text.hover_outlines = [ (2, hover) ]
|
||||
style.large_button_text.selected_outlines = [ (2, selected) ]
|
||||
style.large_button_text.selected_hover_outlines = [ (2, hover) ]
|
||||
style.large_button_text.insensitive_outlines = [ (2, insensitive) ]
|
||||
|
||||
@theme
|
||||
def outline_prompts(
|
||||
@@ -550,8 +570,7 @@ init -1110 python hide:
|
||||
theme.clear_prompts()
|
||||
|
||||
style.prompt_text.color = inside
|
||||
style.prompt_text.drop_shadow = theme.outline_drop_shadow
|
||||
style.prompt_text.drop_shadow_color = prompt
|
||||
style.prompt_text.outlines = [ (2, prompt) ]
|
||||
style.prompt_text.size = text_size
|
||||
|
||||
@theme
|
||||
@@ -563,8 +582,7 @@ init -1110 python hide:
|
||||
theme.clear_labels()
|
||||
|
||||
style.label_text.color = inside
|
||||
style.label_text.drop_shadow = theme.outline_drop_shadow
|
||||
style.label_text.drop_shadow_color = label
|
||||
style.label_text.outlines = [ (2, label) ]
|
||||
style.label_text.size = text_size
|
||||
|
||||
@theme
|
||||
@@ -622,8 +640,6 @@ init -1110 python hide:
|
||||
style.vscrollbar.hover_bottom_bar = Frame(color("vbar", hover), 0, 0)
|
||||
style.vscrollbar.hover_thumb = Frame(color("circle", hover), 0, 7)
|
||||
|
||||
|
||||
|
||||
@theme
|
||||
def outline(
|
||||
inside="#fff",
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This extra contains a basic implementation of voice support. Right
|
||||
# now, voice is given its own toggle, and can either be turned on or
|
||||
# turned off. In the future, we'll probably provide some way of
|
||||
@@ -27,15 +30,17 @@ init -1120:
|
||||
_voice.play = None
|
||||
_voice.sustain = False
|
||||
_voice.seen_in_lint = False
|
||||
|
||||
|
||||
# Call this to specify the voice file that will be played for
|
||||
# the user.
|
||||
def voice(file, **kwargs):
|
||||
|
||||
if not config.has_voice:
|
||||
return
|
||||
|
||||
_voice.play = file
|
||||
|
||||
_last_voice_play = file
|
||||
|
||||
# Call this to specify that the currently playing voice file
|
||||
# should be sustained through the current interaction.
|
||||
def voice_sustain(ignored="", **kwargs):
|
||||
@@ -44,6 +49,14 @@ init -1120:
|
||||
|
||||
_voice.sustain = True
|
||||
|
||||
# Call this to replay the last bit of voice.
|
||||
def voice_replay():
|
||||
renpy.sound.play(_last_voice_play, channel="voice")
|
||||
|
||||
# Returns true if we can replay the voice.
|
||||
def voice_can_replay():
|
||||
return _last_voice_play != None
|
||||
|
||||
python hide:
|
||||
|
||||
# basics: True if the game will have voice.
|
||||
@@ -52,14 +65,16 @@ init -1120:
|
||||
# This is called on each interaction, to ensure that the
|
||||
# appropriate voice file is played for the user.
|
||||
def voice_interact():
|
||||
|
||||
|
||||
if not config.has_voice:
|
||||
return
|
||||
|
||||
if _voice.play and not config.skipping:
|
||||
renpy.sound.play(_voice.play, channel=2)
|
||||
renpy.sound.play(_voice.play, channel="voice")
|
||||
store._last_voice_play = _voice.play
|
||||
elif not _voice.sustain:
|
||||
renpy.sound.stop(channel=2)
|
||||
renpy.sound.stop(channel="voice")
|
||||
store._last_voice_play = _voice.play
|
||||
|
||||
_voice.play = None
|
||||
_voice.sustain = False
|
||||
@@ -68,7 +83,7 @@ init -1120:
|
||||
config.say_sustain_callbacks.append(voice_sustain)
|
||||
|
||||
def voice_afm_callback():
|
||||
return not renpy.sound.is_playing(channel=2)
|
||||
return not renpy.sound.is_playing(channel="voice")
|
||||
|
||||
config.afm_callback = voice_afm_callback
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. Glyphs imported from Arev fonts are (c) Tavmjung Bah (see below)
|
||||
Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
|
||||
Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
|
||||
|
||||
Bitstream Vera Fonts Copyright
|
||||
------------------------------
|
||||
@@ -95,4 +96,4 @@ dealings in this Font Software without prior written authorization
|
||||
from Tavmjong Bah. For further information, contact: tavmjong @ free
|
||||
. fr.
|
||||
|
||||
$Id: LICENSE 778 2006-04-20 18:14:24Z moyogo $
|
||||
$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
######################################################################
|
||||
@@ -7,11 +10,11 @@ init python:
|
||||
# The contents of the game menu choices.
|
||||
config.game_menu = [
|
||||
( "return", u"Return", ui.jumps("_return"), 'True'),
|
||||
( "skipping", u"Begin Skipping", ui.jumps("_return_skipping"), 'config.allow_skipping and not renpy.context().main_menu'),
|
||||
( "skipping", u"Begin Skipping", ui.jumps("_return_skipping"), 'config.allow_skipping and not renpy.context()._main_menu'),
|
||||
( "prefs", u"Preferences", _intra_jumps("_prefs_screen", "intra_transition"), 'True' ),
|
||||
( "save", u"Save Game", _intra_jumps("_save_screen", "intra_transition"), 'not renpy.context().main_menu' ),
|
||||
( "save", u"Save Game", _intra_jumps("_save_screen", "intra_transition"), 'not renpy.context()._main_menu' ),
|
||||
( "load", u"Load Game", _intra_jumps("_load_screen", "intra_transition"), 'True'),
|
||||
( "mainmenu", u"Main Menu", lambda : _mainmenu_prompt(), 'not renpy.context().main_menu' ),
|
||||
( "mainmenu", u"Main Menu", lambda : _mainmenu_prompt(), 'not renpy.context()._main_menu' ),
|
||||
( "quit", u"Quit", lambda : _quit_prompt("quit"), 'True' ),
|
||||
]
|
||||
|
||||
@@ -460,7 +463,7 @@ label _load_screen:
|
||||
|
||||
fn, exists = _file_picker("load", False )
|
||||
|
||||
if not renpy.context().main_menu and _load_prompt:
|
||||
if not renpy.context()._main_menu and _load_prompt:
|
||||
if _yesno_prompt("load", u"Loading will lose unsaved progress.\nAre you sure you want to do this?"):
|
||||
renpy.load(fn)
|
||||
else:
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init:
|
||||
python:
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1170 python hide:
|
||||
|
||||
config.old_names['Quit'] = 'Quit Game'
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Copyright 2004-2006 PyTom
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# Copyright 2004-2011 Tom Rothamel
|
||||
#
|
||||
# Please see the LICENSE.txt distributed with Ren'Py for permission to
|
||||
# copy and modify.
|
||||
|
||||