Compare commits
373 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c728bc9a4 | |||
| a573008ef1 | |||
| 72a8e029ad | |||
| 4142473dc0 | |||
| 6e2bb81a1c | |||
| dd4fc916ec | |||
| 8e755eb157 | |||
| b33b9628fd | |||
| b9a6dfea88 | |||
| e16489fc5e | |||
| 1b0c5477f4 | |||
| d85565910d | |||
| 1201924c28 | |||
| 02be062444 | |||
| 7a113712e1 | |||
| c046a7fd56 | |||
| 07c1599821 | |||
| 9d5154b50a | |||
| 3982c45886 | |||
| 90772350fb | |||
| fd250df032 | |||
| 9ea3c36a88 | |||
| 4cc4cae8bb | |||
| d4d9543019 | |||
| bf2cf5b5e3 | |||
| 99cf00ad54 | |||
| 0ddb47ce6d | |||
| 52f6898ffd | |||
| cc8d2823cd | |||
| 03e09f45c0 | |||
| 061a04cd84 | |||
| 0b555d73ab | |||
| c05606aa94 | |||
| 98a37cb84f | |||
| 94f2fa7a9a | |||
| 1cf9bb29ab | |||
| 771311a955 | |||
| a647a670a4 | |||
| 00e0dfb5c7 | |||
| e1f5a7e9de | |||
| e959d3e694 | |||
| affd6d986f | |||
| f30f82262f | |||
| 39e17a5872 | |||
| b2c3480b8e | |||
| f822e9a0e9 | |||
| 4238849c4b | |||
| 23ad4f0140 | |||
| de85018794 | |||
| cfa85aeb37 | |||
| f81fdd55e2 | |||
| 5a8cf4c4ed | |||
| 98292a2dc3 | |||
| 1f16af50aa | |||
| f24af00189 | |||
| 704546149c | |||
| 259e4bbb9b | |||
| 004a05a49b | |||
| 1a91b29cf5 | |||
| 79b2f36088 | |||
| 8b52a0c515 | |||
| 01689987d5 | |||
| 9b9b8aed61 | |||
| 325299f342 | |||
| 3384fc378f | |||
| 6b66f3cce8 | |||
| d3e54853d6 | |||
| 6aa927c39a | |||
| d70374a5c0 | |||
| 67c4b55663 | |||
| 0cbb4a6c0e | |||
| 6f063c92de | |||
| 5504397bb8 | |||
| 08a15c417d | |||
| ff05b590be | |||
| eb603088ae | |||
| 1363792d17 | |||
| 21ef05b0fa | |||
| 7b34af584f | |||
| 4b5ec57624 | |||
| ccf3ce6f5b | |||
| 0fff7e9bbe | |||
| 90bda7dd23 | |||
| f845f787ad | |||
| c16774c325 | |||
| c2842286c7 | |||
| ee8744b490 | |||
| f14c68d047 | |||
| be76ab63e8 | |||
| ea825dfe23 | |||
| a0c87efac8 | |||
| b55bad9e27 | |||
| 72af1de7e6 | |||
| 85e07b8cb8 | |||
| 55c4369d6e | |||
| d860378a73 | |||
| 1943a31628 | |||
| d7a26f722f | |||
| 9af1b75fda | |||
| 4787441d1f | |||
| 9b47c3c4fd | |||
| 5c63e14ae7 | |||
| ca606112bc | |||
| e0f1fe2847 | |||
| 2179a13ea5 | |||
| 4873db2a6a | |||
| 6768f9da67 | |||
| 1a10e6d4e7 | |||
| 2159888b07 | |||
| 478135fe56 | |||
| 701bfcb23a | |||
| 3d0b9b14c8 | |||
| ad73b70c9e | |||
| c04826f663 | |||
| 9bcb811bb2 | |||
| 61d403f032 | |||
| 7651a34206 | |||
| f2334d05fd | |||
| 20a98290bd | |||
| 870db9d610 | |||
| 7ef94349bd | |||
| 987e38e2e1 | |||
| 547dbf5e16 | |||
| 9e7c373d58 | |||
| c271293b8b | |||
| eed02c98c5 | |||
| c08400cee4 | |||
| 99bf5c7e29 | |||
| 3ee7f91523 | |||
| 3715590a19 | |||
| 81c265ce46 | |||
| 112788b597 | |||
| 6b58675000 | |||
| a0872d1cdc | |||
| 1cad8b6c1e | |||
| 4a25c62fe4 | |||
| 113716bfd3 | |||
| 282b315c77 | |||
| 91b541617e | |||
| 82f634f98e | |||
| 25068cb249 | |||
| 81047a4375 | |||
| d90d91f484 | |||
| f113661745 | |||
| b87ba78b9f | |||
| 60241ad0f3 | |||
| 01471d51c5 | |||
| 8ba8b92d79 | |||
| e12935ed38 | |||
| c0ce664d7c | |||
| 39c06631bf | |||
| de3fd83810 | |||
| 015389dfeb | |||
| da69ef70bd | |||
| 2a47037f7e | |||
| 3fb7aace9c | |||
| 1a33949a5b | |||
| 4ea4a22ec9 | |||
| 55c50e62f1 | |||
| 2b5ebc443e | |||
| 705a9556e7 | |||
| ce1d05b019 | |||
| fb8151f656 | |||
| eb90c6a4e3 | |||
| 33ecff8633 | |||
| fdf7bd8112 | |||
| 8dd4ac2259 | |||
| eafc62936c | |||
| a6991d4950 | |||
| 6be3c59c0f | |||
| d961dd609b | |||
| 0a71291e24 | |||
| 7ec34e80ed | |||
| a124dce48c | |||
| fe191f364a | |||
| 9fd83f56c6 | |||
| bdaa617f65 | |||
| 1b93566780 | |||
| b10af0a3d1 | |||
| b19fe5788b | |||
| e8729a086d | |||
| 9f96864edb | |||
| ae9c2a0af7 | |||
| 76ba294af3 | |||
| 0be10220b3 | |||
| d27549bfdb | |||
| 63d7ee70e0 | |||
| 350af3ccd9 | |||
| cfa355d944 | |||
| 1bb2a49479 | |||
| ed05c4b98c | |||
| b39bb13527 | |||
| 8484b63c2d | |||
| 58d0f71df1 | |||
| f6e9262b0e | |||
| bf2da27703 | |||
| 9c9864528d | |||
| 23f3636fbb | |||
| b84d9e5ca0 | |||
| 9b030c2297 | |||
| 98c4ed746d | |||
| 09e2cbd45c | |||
| 3ff2f0cd56 | |||
| cb6c4d6953 | |||
| acfac50066 | |||
| a90c3e1255 | |||
| 91f5f40fd8 | |||
| a1616b5e65 | |||
| 739ea64fa0 | |||
| 010007b0a1 | |||
| 13fe854082 | |||
| 249c98f320 | |||
| 46e84d3661 | |||
| 171eb33966 | |||
| 35cdadbcee | |||
| fd501a7a03 | |||
| d27ea92fd1 | |||
| 0a701ed929 | |||
| b5e6cb97c7 | |||
| b2671013fd | |||
| 3eada61cc7 | |||
| f693e26ab0 | |||
| f575a1f233 | |||
| 9834b85ced | |||
| b8d96d86b7 | |||
| d58eaaf387 | |||
| 67adb17ad3 | |||
| 435e919326 | |||
| 37f35e4f34 | |||
| 3c6353f73e | |||
| dfc573d307 | |||
| 6758b6acc7 | |||
| 2c9bfddb4e | |||
| 81bf4c2288 | |||
| b38ae1fb13 | |||
| 7f0ce7a40b | |||
| 0f5da2d89b | |||
| c80095f511 | |||
| a9414d4692 | |||
| d2de95afc1 | |||
| 718a8fb4f8 | |||
| 7c603578db | |||
| 86e3c7f12f | |||
| 7d8f8b8f12 | |||
| 546a16e23c | |||
| 80571b8fbd | |||
| 7b1a634701 | |||
| 3e4efa344e | |||
| 13c76f6cb5 | |||
| a71e6cf6ec | |||
| b1dbbeeef8 | |||
| 1d3216b6c9 | |||
| 11bbe2cff8 | |||
| ff83ef5676 | |||
| dcfc3a173e | |||
| 2f83caea2d | |||
| 17ed25387d | |||
| 4d8c1031cd | |||
| 89f4b81b57 | |||
| ad50aa7602 | |||
| 316c64bb48 | |||
| 19920b37ca | |||
| ef5d6a4b66 | |||
| 2ea0299615 | |||
| 4cd605c134 | |||
| c2ddd39f2c | |||
| 47209c9f63 | |||
| bb9c7dfe46 | |||
| d95192e018 | |||
| 68b76e2306 | |||
| 6f0c5125ae | |||
| 7b6da918a7 | |||
| 0c05990db3 | |||
| a3581860b3 | |||
| f371ed6f5f | |||
| 17ea9736cd | |||
| a1e13e3eab | |||
| 1de06e650e | |||
| f92f14f68a | |||
| a3c5e57616 | |||
| 5840d6c464 | |||
| ba751a8a93 | |||
| 29c7d33c0a | |||
| dfb053dbd6 | |||
| 5918606f33 | |||
| 794f8955e3 | |||
| e90754e2dc | |||
| 976b4fc2fc | |||
| ddb7bd2167 | |||
| 74fd442303 | |||
| 66555facd5 | |||
| 83b9ca6b96 | |||
| dddeb56b91 | |||
| 39a799e995 | |||
| 88032a1478 | |||
| 90e547b0a5 | |||
| cc9ea22354 | |||
| ea3d409c19 | |||
| 5ef40f8c3e | |||
| 71ccf249f2 | |||
| 45d9d640ee | |||
| 14c38ded81 | |||
| d90d68fd68 | |||
| 9abd26d76c | |||
| 3f0b27ba26 | |||
| 70276655c8 | |||
| b07b6aa32f | |||
| bcce21b0d5 | |||
| 967e0d6539 | |||
| 383193d478 | |||
| 6b640a7070 | |||
| e22a2c16bd | |||
| 67f356f1b4 | |||
| 2eee3c772b | |||
| 7b14755607 | |||
| 8c8940dcbb | |||
| 5aadfa5ca4 | |||
| 46ef0cbf04 | |||
| be6d4fdf77 | |||
| c663b71114 | |||
| e9b8a16a80 | |||
| 2750bcf927 | |||
| 320dc92092 | |||
| 790bdb03e7 | |||
| 619addc5f0 | |||
| 47fb3f9438 | |||
| 7ac22328b2 | |||
| 91989a56e9 | |||
| 34070e63e6 | |||
| 1a5a7ef82a | |||
| e2ae6828be | |||
| 9f02ad9a82 | |||
| 0289c770b4 | |||
| 6c5ce3198e | |||
| 7acc54daa3 | |||
| 08192c47fc | |||
| b94a84b931 | |||
| 82576c5ed6 | |||
| 19333248d9 | |||
| 4774017317 | |||
| 21a667d645 | |||
| 81276aeb26 | |||
| 8e975217f5 | |||
| 3d47c7bae3 | |||
| c93a2ed5d5 | |||
| eb9b83860b | |||
| d9b7c73e8f | |||
| 0f5b7267fb | |||
| eac1b02212 | |||
| cc8396a8ab | |||
| 31a8cd2a3c | |||
| 295e64a02c | |||
| ee566fc6c8 | |||
| fb60c4acfe | |||
| 8381b5184c | |||
| 9e5570b1b4 | |||
| 2caaebc1f5 | |||
| abb99e19e2 | |||
| 63ed2b8632 | |||
| 07d1391c4a | |||
| b69c0c2007 | |||
| 6bda5fa459 | |||
| 5e9f4e71c8 | |||
| d2188c860f | |||
| b60ad5f3ec | |||
| 5305670f1c | |||
| bfb9380de0 | |||
| 25c7bc5726 | |||
| 63acf7eb05 | |||
| 2f134f69f1 | |||
| bf17e281c9 | |||
| 2b40f1b84d | |||
| e6617caeef |
@@ -1,93 +0,0 @@
|
||||
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
|
||||
@@ -0,0 +1,54 @@
|
||||
*.rpyc
|
||||
*.rpyb
|
||||
*.rpymc
|
||||
*.pyc
|
||||
*.pyo
|
||||
|
||||
*~
|
||||
*.bak
|
||||
|
||||
saves
|
||||
tmp
|
||||
cache
|
||||
|
||||
log.txt
|
||||
|
||||
/build
|
||||
/dist
|
||||
/dists
|
||||
/renpy.app
|
||||
/jedit
|
||||
/lint.txt
|
||||
/renpy.code
|
||||
/traceback.txt
|
||||
/testing*
|
||||
/screenshot*
|
||||
/errors.txt
|
||||
/styles.txt
|
||||
/Microsoft.VC90.CRT.manifest
|
||||
/console.exe
|
||||
/msvcr90.dll
|
||||
/python27.dll
|
||||
/renpy.exe
|
||||
/lib/windows-x86
|
||||
/lib/linux-x86_64
|
||||
/lib/linux-i686
|
||||
/lib/python2.7
|
||||
/doc
|
||||
/.pydevproject
|
||||
/.pydevproject.bak
|
||||
/.project
|
||||
/.settings
|
||||
/LICENSE.txt
|
||||
/template/README.html
|
||||
/the_question/README.html
|
||||
/tutorial/README.html
|
||||
/renpy/angle/*.pyx
|
||||
/renpy/angle/*.pxd
|
||||
/renpy-ppc.zip
|
||||
/module/build
|
||||
/module/gen
|
||||
/editra
|
||||
|
||||
dl
|
||||
renpy/vc_version.py
|
||||
@@ -1,15 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
echo need version
|
||||
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 renpy-ppc.zip ~/ab/website/renpy/dl/$1
|
||||
|
||||
cd ~/ab/website
|
||||
./upload.sh
|
||||
|
||||
@@ -5,3 +5,4 @@ ln -s ../help.html the_question/README.html
|
||||
ln -s ../help.html template/README.html
|
||||
|
||||
ln -s sphinx/source/license.rst LICENSE.txt
|
||||
ln -s sphinx/build/html doc
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# This file sets up the normal python modules. It's used to help eclipse
|
||||
# do type detection, by providing an importable version of the cython code.
|
||||
|
||||
from distutils.core import setup
|
||||
|
||||
setup(
|
||||
packages=['renpy', 'renpy.gl', 'renpy.angle', 'renpy.display', 'renpy.audio', 'renpy.text', 'pysdlsound'],
|
||||
package_dir={ 'pysdlsound' : 'module' },
|
||||
)
|
||||
|
||||
@@ -54,10 +54,10 @@ def main():
|
||||
'win32con',
|
||||
'win32api',
|
||||
'Numeric',
|
||||
'locale',
|
||||
'gettext',
|
||||
'os2emxpath',
|
||||
'macpath',
|
||||
'multiprocessing',
|
||||
'_multiprocessing',
|
||||
],
|
||||
'optimize' : 2,
|
||||
} },
|
||||
@@ -93,15 +93,16 @@ def main():
|
||||
os.unlink("dist/lib/windows-x86/renpy.code")
|
||||
os.rename("dist/lib/windows-x86/renpy.code.new", "dist/lib/windows-x86/renpy.code")
|
||||
|
||||
# Take these files from the old python.
|
||||
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("python27.dll")
|
||||
move_from_dist("renpy.exe")
|
||||
|
||||
|
||||
|
||||
|
||||
try:
|
||||
main()
|
||||
except:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 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
|
||||
|
||||
@@ -0,0 +1,301 @@
|
||||
|
||||
# Contains functions and variables that control the building of
|
||||
# distributions.
|
||||
|
||||
init -1000 python in build:
|
||||
|
||||
def make_file_lists(s):
|
||||
"""
|
||||
Turns `s` into a (perhaps empty) list of file_lists.
|
||||
|
||||
If `s` is a list or None, then returns it. If it's a string, splits
|
||||
it on whitespace. Otherwise, errors out.
|
||||
"""
|
||||
|
||||
if s is None:
|
||||
return s
|
||||
elif isinstance(s, list):
|
||||
return s
|
||||
elif isinstance(s, basestring):
|
||||
return s.split()
|
||||
|
||||
raise Exception("Expected a string, list, or None.")
|
||||
|
||||
|
||||
|
||||
def pattern_list(l):
|
||||
"""
|
||||
Apply file_lists to the second argument of each tuple in a list.
|
||||
"""
|
||||
|
||||
rv = [ ]
|
||||
|
||||
for pattern, groups in l:
|
||||
rv.append((pattern, make_file_lists(groups)))
|
||||
|
||||
return rv
|
||||
|
||||
# Patterns that are used to classify Ren'Py.
|
||||
renpy_patterns = pattern_list([
|
||||
( "**~", None),
|
||||
( "**/#*", None),
|
||||
( "**/.*", None),
|
||||
( "**.old", None),
|
||||
( "**.new", None),
|
||||
( "**.rpa", None),
|
||||
|
||||
( "**/*.pyc", None),
|
||||
|
||||
( "renpy.py", "all"),
|
||||
( "renpy/**", "all"),
|
||||
( "common/**", "all"),
|
||||
|
||||
# Windows-specific patterns.
|
||||
( "python*.dll", "windows" ),
|
||||
( "msvcr*.dll", "windows"),
|
||||
( "Microsoft.VC*.CRT.manifest", "windows"),
|
||||
( "lib/dxwebsetup.exe", "windows"),
|
||||
( "lib/windows-x86/**", "windows"),
|
||||
|
||||
# Linux patterns.
|
||||
( "renpy.sh", "linux"),
|
||||
( "lib/linux-x86_64/**", "linux"),
|
||||
( "lib/linux-i686/**", "linux"),
|
||||
( "lib/python2.7/**", "linux"),
|
||||
|
||||
# Mac patterns.
|
||||
( "renpy.app/Contents/Ren'Py Launcher", None),
|
||||
( "renpy.app/Contents/Info.plist", None),
|
||||
( "renpy.app/Contents/Resources/launcher.py", None),
|
||||
( "renpy.app/Contents/Resources/launcher.icns", None),
|
||||
( "renpy.app/**", "mac"),
|
||||
|
||||
# Shared patterns.
|
||||
( "/lib/", "windows linux"),
|
||||
])
|
||||
|
||||
|
||||
def classify_renpy(pattern, groups):
|
||||
"""
|
||||
Classifies files in the Ren'Py base directory according to pattern.
|
||||
"""
|
||||
|
||||
renpy_patterns.append((pattern, make_file_lists(groups)))
|
||||
|
||||
# Patterns that are relative to the base directory.
|
||||
|
||||
early_base_patterns = pattern_list([
|
||||
("*.py", None),
|
||||
("*.sh", None),
|
||||
("*.app/", None),
|
||||
("*.dll", None),
|
||||
("*.manifest", None),
|
||||
|
||||
("lib/", None),
|
||||
("renpy/", None),
|
||||
("update/", None),
|
||||
("common/", None),
|
||||
("update/", None),
|
||||
|
||||
("icon.ico", None),
|
||||
("icon.icns", None),
|
||||
("project.json", None),
|
||||
|
||||
("tmp/", None),
|
||||
("game/saves/", None),
|
||||
|
||||
("archived/", None),
|
||||
("launcherinfo.py", None),
|
||||
("android.txt", None),
|
||||
])
|
||||
|
||||
base_patterns = [ ]
|
||||
|
||||
late_base_patterns = pattern_list([
|
||||
("**", "all")
|
||||
])
|
||||
|
||||
def classify(pattern, file_list):
|
||||
"""
|
||||
:doc: build
|
||||
|
||||
Classifies files that match `pattern` into `file_list`.
|
||||
"""
|
||||
|
||||
base_patterns.append((pattern, make_file_lists(file_list)))
|
||||
|
||||
def clear():
|
||||
"""
|
||||
:doc: build
|
||||
|
||||
Clears the list of patterns used to classify files.
|
||||
"""
|
||||
|
||||
base_patterns[:] = [ ]
|
||||
|
||||
def remove(l, pattern):
|
||||
"""
|
||||
Removes the pattern from the list.
|
||||
"""
|
||||
|
||||
l[:] = [ (p, fl) for i in l if p != pattern ]
|
||||
|
||||
# Archiving.
|
||||
|
||||
archives = [ ]
|
||||
|
||||
def archive(name, file_list="all"):
|
||||
"""
|
||||
:doc: build
|
||||
|
||||
Declares the existence of an archive. If one or more files are
|
||||
classified with `name`, `name`.rpa is build as an archive. The
|
||||
archive is included in the named file lists.
|
||||
"""
|
||||
|
||||
archives.append((name, make_file_lists(file_list)))
|
||||
|
||||
archive("archive", "all")
|
||||
|
||||
# Documentation patterns.
|
||||
|
||||
documentation_patterns = [ ]
|
||||
|
||||
def documentation(pattern):
|
||||
"""
|
||||
:doc: build
|
||||
|
||||
Declares a pattern that matches documentation. In a mac app build,
|
||||
files matching the documentation pattern are stored twice - once
|
||||
inside the app package, and again outside of it.
|
||||
"""
|
||||
|
||||
documentation_patterns.append(pattern)
|
||||
|
||||
xbit_patterns = [
|
||||
"**.sh",
|
||||
"**/*.so.*",
|
||||
"**/*.so",
|
||||
"**/*.dylib",
|
||||
"**.app/Contents/MacOS/*",
|
||||
"lib/**/python",
|
||||
"lib/**/zsync",
|
||||
"lib/**/zsyncmake",
|
||||
]
|
||||
|
||||
def executable(pattern):
|
||||
"""
|
||||
:doc: build
|
||||
|
||||
Adds a pattern marking files as executable on platforms that support it.
|
||||
(Linux and Macintosh)
|
||||
"""
|
||||
|
||||
xbit_patterns.append(pattern)
|
||||
|
||||
# Packaging.
|
||||
|
||||
packages = [ ]
|
||||
|
||||
def package(name, format, file_lists, description=None, update=True, dlc=False):
|
||||
"""
|
||||
:doc: build
|
||||
|
||||
Declares a package that can be built by the packaging
|
||||
tool.
|
||||
|
||||
`name`
|
||||
The name of the package.
|
||||
|
||||
`format`
|
||||
The format of the package. A string containing a space separated
|
||||
list of:
|
||||
|
||||
zip
|
||||
A zip file.
|
||||
app-zip
|
||||
A zip file containing a macintosh application.
|
||||
tar.bz2
|
||||
A tar.bz2 file.
|
||||
|
||||
The empty string will not build any package formats (this
|
||||
makes dlc possible).
|
||||
|
||||
`file_lists`
|
||||
A list containing the file lists that will be contained
|
||||
within the package.
|
||||
|
||||
`description`
|
||||
An optional description of the package to be built.
|
||||
|
||||
`update`
|
||||
If true and updates are being built, an update will be
|
||||
built for this package.
|
||||
|
||||
`dlc`
|
||||
If true, any zip or tar.bz2 file will be built in
|
||||
standalone DLC mode, without an update directory.
|
||||
"""
|
||||
|
||||
formats = format.split()
|
||||
|
||||
for i in formats:
|
||||
if i not in [ "zip", "app-zip", "tar.bz2" ]:
|
||||
raise Exception("Format {} not known.".format(i))
|
||||
|
||||
if description is None:
|
||||
description = name
|
||||
|
||||
d = {
|
||||
"name" : name,
|
||||
"formats" : formats,
|
||||
"file_lists" : make_file_lists(file_lists),
|
||||
"description" : description,
|
||||
"update" : update,
|
||||
"dlc" : dlc,
|
||||
}
|
||||
|
||||
packages.append(d)
|
||||
|
||||
package("all", "zip", "windows mac linux all", "All Desktop Platforms")
|
||||
package("linux", "tar.bz2", "linux all", "Linux x86/x86_64")
|
||||
package("mac", "app-zip", "mac all", "Macintosh x86")
|
||||
package("win", "zip", "windows all", "Windows x86")
|
||||
|
||||
# Data that we expect the user to set.
|
||||
|
||||
# The name of directories in the archives.
|
||||
directory_name = ""
|
||||
|
||||
# The name of executables.
|
||||
executable_name = ""
|
||||
|
||||
# Should we include update information into the archives?
|
||||
include_update = False
|
||||
|
||||
# A verbose version to include in the update.
|
||||
version = None
|
||||
|
||||
# Are we building Ren'Py?
|
||||
renpy = False
|
||||
|
||||
# This function is called by the json_dump command to dump the build data
|
||||
# into the json file.
|
||||
def dump():
|
||||
rv = { }
|
||||
|
||||
rv["directory_name"] = directory_name
|
||||
rv["executable_name"] = executable_name
|
||||
rv["include_update"] = include_update
|
||||
|
||||
rv["packages"] = packages
|
||||
rv["archives"] = archives
|
||||
rv["documentation_patterns"] = documentation_patterns
|
||||
rv["base_patterns"] = early_base_patterns + base_patterns + late_base_patterns
|
||||
rv["renpy_patterns"] = renpy_patterns
|
||||
rv["xbit_patterns"] = xbit_patterns
|
||||
rv["version"] = version or directory_name
|
||||
|
||||
rv["renpy"] = renpy
|
||||
|
||||
return rv
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1210 python:
|
||||
@@ -58,11 +58,17 @@ init -1210 python:
|
||||
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
|
||||
|
||||
|
||||
|
||||
if (6, 12, 2) < version <= (6, 13, 8):
|
||||
config.old_substitutions = False
|
||||
|
||||
if version <= (6, 13, 12):
|
||||
global MoveTransition
|
||||
MoveTransition = OldMoveTransition
|
||||
|
||||
|
||||
init 1210 python hide::
|
||||
|
||||
# This returns true if the script_version is <= the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains a number of definitions of standard
|
||||
@@ -47,6 +47,20 @@ init -1110:
|
||||
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
|
||||
|
||||
# These are used by the transitions to move things offscreen. We don't
|
||||
# expect them to be used by user code.
|
||||
transform _moveleft:
|
||||
xpos 0.0 xanchor 1.0
|
||||
|
||||
transform _moveright:
|
||||
xpos 1.0 xanchor 0.0
|
||||
|
||||
transform _movetop:
|
||||
ypos 0.0 yanchor 1.0
|
||||
|
||||
transform _movebottom:
|
||||
ypos 1.0 yanchor 0.0
|
||||
|
||||
python:
|
||||
config.default_transform = default
|
||||
|
||||
@@ -83,6 +97,7 @@ init -1110 python:
|
||||
|
||||
# Ease images around. These are basically cosine-warped moves.
|
||||
def _ease_out_time_warp(x):
|
||||
print "ZZZ"
|
||||
import math
|
||||
return 1.0 - math.cos(x * math.pi / 2.0)
|
||||
|
||||
@@ -94,7 +109,12 @@ init -1110 python:
|
||||
import math
|
||||
return .5 - math.cos(math.pi * x) / 2.0
|
||||
|
||||
# This defines a family of move transitions.
|
||||
|
||||
# Back up the move transition, so that if MoveTransition gets replaced by
|
||||
# renpy.compat, this still works.
|
||||
__MoveTransition = MoveTransition
|
||||
|
||||
# This defines a family of move transitions, using the old-style methods.
|
||||
def move_transitions(prefix, delay, time_warp=None, in_time_warp=None, out_time_warp=None, old=False, layers=[ 'master' ], **kwargs):
|
||||
"""
|
||||
:doc: transition_family
|
||||
@@ -132,10 +152,6 @@ init -1110 python:
|
||||
`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
|
||||
@@ -150,63 +166,79 @@ init -1110 python:
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs)),
|
||||
time_warp=time_warp),
|
||||
|
||||
"inright" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((1.0, None, 0.0, None), time_warp=in_time_warp, **kwargs)),
|
||||
enter=_moveright,
|
||||
time_warp=time_warp,
|
||||
enter_time_warp=in_time_warp,
|
||||
),
|
||||
|
||||
"inleft" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((0.0, None, 1.0, None), time_warp=in_time_warp, **kwargs)),
|
||||
|
||||
enter=_moveleft,
|
||||
time_warp=time_warp,
|
||||
enter_time_warp=in_time_warp,
|
||||
),
|
||||
|
||||
"intop" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((None, 0.0, None, 1.0), time_warp=in_time_warp, **kwargs)),
|
||||
|
||||
enter=_movetop,
|
||||
time_warp=time_warp,
|
||||
enter_time_warp=in_time_warp,
|
||||
),
|
||||
|
||||
"inbottom" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
enter_factory=MoveIn((None, 1.0, None, 0.0), time_warp=in_time_warp, **kwargs)),
|
||||
enter=_movebottom,
|
||||
time_warp=time_warp,
|
||||
enter_time_warp=in_time_warp,
|
||||
),
|
||||
|
||||
"outright" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((1.0, None, 0.0, None), time_warp=out_time_warp, **kwargs)),
|
||||
leave=_moveright,
|
||||
time_warp=time_warp,
|
||||
leave_time_warp=out_time_warp,
|
||||
),
|
||||
|
||||
"outleft" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((0.0, None, 1.0, None), time_warp=out_time_warp, **kwargs)),
|
||||
leave=_moveleft,
|
||||
time_warp=time_warp,
|
||||
leave_time_warp=out_time_warp,
|
||||
),
|
||||
|
||||
"outtop" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((None, 0.0, None, 1.0), time_warp=out_time_warp, **kwargs)),
|
||||
leave=_movetop,
|
||||
time_warp=time_warp,
|
||||
leave_time_warp=out_time_warp,
|
||||
),
|
||||
|
||||
"outbottom" : MoveTransition(
|
||||
delay,
|
||||
old=old,
|
||||
layers=layers,
|
||||
factory=MoveFactory(time_warp=time_warp, **kwargs),
|
||||
leave_factory=MoveOut((None, 1.0, None, 0.0), time_warp=time_warp, **kwargs)),
|
||||
leave=_movebottom,
|
||||
time_warp=time_warp,
|
||||
leave_time_warp=out_time_warp,
|
||||
),
|
||||
}
|
||||
|
||||
for k, v in moves.iteritems():
|
||||
@@ -218,10 +250,10 @@ init -1110 python:
|
||||
define.move_transitions("move", 0.5)
|
||||
define.move_transitions("ease", 0.5, _ease_time_warp, _ease_in_time_warp, _ease_out_time_warp)
|
||||
|
||||
# Zoom-based transitions.
|
||||
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))
|
||||
# Zoom-based transitions. Legacy - nowadays, these are probably best done with ATL.
|
||||
zoomin = OldMoveTransition(0.5, enter_factory=ZoomInOut(0.01, 1.0))
|
||||
zoomout = OldMoveTransition(0.5, leave_factory=ZoomInOut(1.0, 0.01))
|
||||
zoominout = OldMoveTransition(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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1135 python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This contains code to choose between OpenGL and Software rendering, when
|
||||
@@ -357,9 +357,9 @@ label _directx_update_main:
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# Start dxsetup. We have to go through start to ensure that UAC
|
||||
# Start dxsetup. We have to go through startfile to ensure that UAC
|
||||
# doesn't cause problems.
|
||||
subprocess.Popen(["start", __dxwebsetup], shell=True)
|
||||
os.startfile(__dxwebsetup)
|
||||
|
||||
renpy.show_screen("_directx_update")
|
||||
ui.interact(suppress_overlay=True, suppress_underlay=True)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1105 python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file consists of renpy functions that aren't expected to be
|
||||
@@ -196,15 +196,12 @@ init -1180 python:
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
# Called to make a screenshot happen.
|
||||
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("/")
|
||||
|
||||
@@ -215,11 +212,11 @@ init -1180 python:
|
||||
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 = dest + "/" + pattern % i
|
||||
fn = os.path.join(dest, config.screenshot_pattern % i)
|
||||
if not os.path.exists(fn):
|
||||
break
|
||||
i += 1
|
||||
@@ -241,6 +238,9 @@ init -1180 python:
|
||||
_predict_screens = [ ]
|
||||
|
||||
init -1180 python hide:
|
||||
|
||||
import os
|
||||
config.screenshot_pattern = os.environ.get("RENPY_SCREENSHOT_PATTERN", "screenshot%04d.png")
|
||||
|
||||
def dump_styles():
|
||||
if config.developer:
|
||||
@@ -562,6 +562,8 @@ init -1180 python:
|
||||
ui.interact()
|
||||
|
||||
def _enter_menu():
|
||||
config.skipping = None
|
||||
|
||||
renpy.movie_stop(only_fullscreen=True)
|
||||
renpy.take_screenshot((config.thumbnail_width, config.thumbnail_height))
|
||||
|
||||
@@ -870,12 +872,17 @@ init 1180 python hide:
|
||||
create_automatic_images()
|
||||
|
||||
|
||||
# Load the developer screen, if necessary.
|
||||
# After init, make some changes based on if config.developer is True.
|
||||
init 1180 python hide:
|
||||
|
||||
if config.developer:
|
||||
if config.debug_sound is None:
|
||||
config.debug_sound = True
|
||||
|
||||
renpy.load_module("_developer")
|
||||
|
||||
|
||||
|
||||
# Entry point for the developer screen. The rest of it is loaded from
|
||||
# _developer.rpym
|
||||
label _developer:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# Common stuff that's used by the various Ren'Py menus. This includes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains code that sets up the various mixers, based on how
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains the code to implement Ren'Py's music room function,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This is an implementation of NVL-mode, which can be used to show
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# Screen system support.
|
||||
|
||||
init -1140 python:
|
||||
@@ -119,6 +122,7 @@ init -1140 python:
|
||||
def __call__(self):
|
||||
_screenshot()
|
||||
|
||||
|
||||
def HideInterface():
|
||||
"""
|
||||
:doc other_action
|
||||
@@ -128,7 +132,25 @@ init -1140 python:
|
||||
|
||||
return ui.callsinnewcontext("_hide_windows")
|
||||
|
||||
|
||||
|
||||
class OpenURL(Action):
|
||||
"""
|
||||
:doc: other_action
|
||||
|
||||
Causes `url` to be opened in a web browser.
|
||||
"""
|
||||
|
||||
def __init__(self, url):
|
||||
self.url = url
|
||||
|
||||
def __call__(self):
|
||||
try:
|
||||
import webbrowser
|
||||
webbrowser.open_new(self.url)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
class With(Action):
|
||||
"""
|
||||
:doc: other_action
|
||||
@@ -868,11 +890,14 @@ init -1140 python:
|
||||
The styles of the bar created.
|
||||
`offset`
|
||||
An offset to add to the value.
|
||||
`step`
|
||||
The amount to change the bar by. If None, defaults to 1/10th of
|
||||
the bar.
|
||||
"""
|
||||
|
||||
offset = 0
|
||||
|
||||
def __init__(self, object, field, range, max_is_zero=False, style="bar", offset=0):
|
||||
def __init__(self, object, field, range, max_is_zero=False, style="bar", offset=0, step=None):
|
||||
self.object = object
|
||||
self.field = field
|
||||
self.range = range
|
||||
@@ -880,6 +905,14 @@ init -1140 python:
|
||||
self.style = style
|
||||
self.offset = offset
|
||||
|
||||
if step is None:
|
||||
if isinstance(range, float):
|
||||
step = range / 10.0
|
||||
else:
|
||||
step = max(range / 10, 1)
|
||||
|
||||
self.step = step
|
||||
|
||||
def changed(self, value):
|
||||
|
||||
if self.max_is_zero:
|
||||
@@ -907,7 +940,8 @@ init -1140 python:
|
||||
return ui.adjustment(
|
||||
range=self.range,
|
||||
value=value,
|
||||
changed=self.changed)
|
||||
changed=self.changed,
|
||||
step=self.step)
|
||||
|
||||
def get_style(self):
|
||||
return self.style, "v" + self.style
|
||||
@@ -1004,9 +1038,63 @@ init -1140 python:
|
||||
return str((page - 1) * config.linear_saves_page_size + name)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
|
||||
return str(page) + "-" + str(name)
|
||||
|
||||
def __unused_slot_name(page):
|
||||
"""
|
||||
Returns an unused slot name.
|
||||
"""
|
||||
|
||||
import time
|
||||
|
||||
rv = int(time.time())
|
||||
|
||||
while True:
|
||||
if not renpy.can_load(__filename(str(rv), page)):
|
||||
return str(rv)
|
||||
|
||||
rv += 1
|
||||
|
||||
def FileCurrentPage():
|
||||
"""
|
||||
:doc: file_action_function
|
||||
|
||||
Returns the current file page as a string.
|
||||
"""
|
||||
|
||||
return str(persistent._file_page)
|
||||
|
||||
def FileUsedSlots(page=None, highest_first=True):
|
||||
"""
|
||||
:doc: file_action_function
|
||||
|
||||
Returns a list of used numeric file slots on the page.
|
||||
|
||||
`page`
|
||||
The name of the page that will be scanned. If None, the current page
|
||||
is used.
|
||||
|
||||
`highest_first`
|
||||
If true, the highest-numbered file slot is listed first.
|
||||
Otherwise, the lowest-numbered slot is listed first.
|
||||
"""
|
||||
|
||||
regexp = __filename(r'\d+', page)
|
||||
|
||||
rv = [ ]
|
||||
|
||||
for fn in renpy.list_saved_games(regexp=regexp, fast=True):
|
||||
_page, _, slot = fn.partition('-')
|
||||
|
||||
rv.append(int(slot))
|
||||
|
||||
rv.sort()
|
||||
if highest_first:
|
||||
rv.reverse()
|
||||
|
||||
return rv
|
||||
|
||||
def FileLoadable(name, page=None):
|
||||
"""
|
||||
:doc: file_action_function
|
||||
@@ -1015,10 +1103,7 @@ init -1140 python:
|
||||
if the file is loadable, and false otherwise.
|
||||
"""
|
||||
|
||||
if renpy.scan_saved_game(__filename(name, page)):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return renpy.can_load(__filename(name, page))
|
||||
|
||||
def FileScreenshot(name, empty=None, page=None):
|
||||
"""
|
||||
@@ -1093,6 +1178,11 @@ init -1140 python:
|
||||
The button with this slot is selected if it's marked as the
|
||||
newest save file.
|
||||
|
||||
`name`
|
||||
The name of the slot to save to. If None, an unused slot
|
||||
(a large number based on the current time) will be
|
||||
will be used.
|
||||
|
||||
`confirm`
|
||||
If true, then we will prompt before overwriting a file.
|
||||
|
||||
@@ -1101,7 +1191,8 @@ init -1140 python:
|
||||
file when it's saved.
|
||||
|
||||
`page`
|
||||
The name of the page that it will be saved to.
|
||||
The name of the page that the slot is on. If None, the current
|
||||
page is used.
|
||||
|
||||
`cycle`
|
||||
If true, then saves on the supplied page will be cycled before
|
||||
@@ -1109,6 +1200,9 @@ init -1140 python:
|
||||
"""
|
||||
|
||||
def __init__(self, name, confirm=True, newest=True, page=None, cycle=False):
|
||||
if name is None:
|
||||
name = __unused_slot_name(page)
|
||||
|
||||
self.name = name
|
||||
self.confirm = confirm
|
||||
self.page = page
|
||||
@@ -1161,14 +1255,26 @@ init -1140 python:
|
||||
|
||||
Loads the file.
|
||||
|
||||
`name`
|
||||
The name of the slot to load from. If None, an unused slot
|
||||
the file will not be loadable.
|
||||
|
||||
`confirm`
|
||||
If true, prompt if loading the file will end the game.
|
||||
|
||||
`page`
|
||||
The page that the file will be loaded from. If None, the
|
||||
current page is used.
|
||||
|
||||
`newest`
|
||||
If true, the button is selected if this is the newest file.
|
||||
"""
|
||||
|
||||
def __init__(self, name, confirm=True, page=None, newest=True):
|
||||
|
||||
if name is None:
|
||||
name = __unused_slot_name(page)
|
||||
|
||||
self.name = name
|
||||
self.confirm = confirm
|
||||
self.page = page
|
||||
@@ -1189,7 +1295,7 @@ init -1140 python:
|
||||
renpy.load(fn)
|
||||
|
||||
def get_sensitive(self):
|
||||
return renpy.scan_saved_game(__filename(self.name, self.page))
|
||||
return renpy.can_load(__filename(self.name, self.page))
|
||||
|
||||
def get_selected(self):
|
||||
if not self.confirm or not self.newest:
|
||||
@@ -1226,7 +1332,7 @@ init -1140 python:
|
||||
renpy.unlink_save(fn)
|
||||
|
||||
def get_sensitive(self):
|
||||
return renpy.scan_saved_game(__filename(self.name, self.page))
|
||||
return renpy.can_load(__filename(self.name, self.page))
|
||||
|
||||
def get_selected(self):
|
||||
return persistent._file_newest == __filename(self.name, self.page)
|
||||
@@ -1238,6 +1344,15 @@ init -1140 python:
|
||||
|
||||
"Does the right thing" with the file. This means loading it if the
|
||||
load screen is showing, and saving to it otherwise.
|
||||
|
||||
`name`
|
||||
The name of the slot to save to or load from. If None, an unused slot
|
||||
(a large number based on the current time) will be
|
||||
will be used.
|
||||
|
||||
`page`
|
||||
The page that the file will be saved to or loaded from. If None, the
|
||||
current page is used.
|
||||
"""
|
||||
|
||||
if renpy.current_screen().screen_name[0] == "load":
|
||||
@@ -1433,7 +1548,7 @@ init -1140 python:
|
||||
def __call__(self):
|
||||
renpy.take_screenshot()
|
||||
|
||||
def QuickSave(message="Quick save complete."):
|
||||
def QuickSave(message="Quick save complete.", newest=False):
|
||||
"""
|
||||
:doc: file_action
|
||||
|
||||
@@ -1441,11 +1556,14 @@ init -1140 python:
|
||||
|
||||
`message`
|
||||
A message to display to the user when the quick save finishes.
|
||||
"""
|
||||
|
||||
`newest`
|
||||
Set to true to mark the quicksave as the newest save.
|
||||
"""
|
||||
|
||||
return [
|
||||
FileTakeScreenshot(),
|
||||
FileSave(1, page="quick", confirm=False, cycle=True),
|
||||
FileSave(1, page="quick", confirm=False, cycle=True, newest=newest),
|
||||
Notify("Quick save complete.") ]
|
||||
|
||||
def QuickLoad():
|
||||
@@ -1461,7 +1579,10 @@ init -1140 python:
|
||||
##########################################################################
|
||||
# Side Images
|
||||
|
||||
def SideImage(tag="side"):
|
||||
config.side_image_tag = None
|
||||
config.side_image_only_not_showing = False
|
||||
|
||||
def SideImage(prefix_tag="side"):
|
||||
"""
|
||||
:doc: side_image_function
|
||||
|
||||
@@ -1469,7 +1590,7 @@ init -1140 python:
|
||||
or a Null displayable if no such side image exists.
|
||||
"""
|
||||
|
||||
name = renpy.get_side_image(tag)
|
||||
name = renpy.get_side_image(prefix_tag, image_tag=config.side_image_tag, not_showing=config.side_image_only_not_showing)
|
||||
if name is None:
|
||||
return Null()
|
||||
else:
|
||||
@@ -1524,14 +1645,14 @@ init -1140 python:
|
||||
* Preference("transitions", "none") - do not show transitions.
|
||||
* Preference("transitions", "toggle") - toggle transitions.
|
||||
|
||||
* Preference("text speed", 0) - make test appear instantaneously.
|
||||
* Preference("text speed", 0) - make text appear instantaneously.
|
||||
* Preference("text speed", 142) - set text speed to 142 characters per second.
|
||||
|
||||
* Preference("joystick") - Show the joystick preferences.
|
||||
|
||||
* Preference("skip", "seen") - Only skip seen messages.
|
||||
* Preference("skip", "all") - Skip unseen messages.
|
||||
* Preference("skip", "toggle") - Toggle skipping.
|
||||
* Preference("skip", "toggle") - Toggle between skip seen and skip all.
|
||||
|
||||
* Preference("begin skipping") - Starts skipping.
|
||||
|
||||
@@ -1556,7 +1677,7 @@ init -1140 python:
|
||||
|
||||
* Preference("voice mute", "enable") - Mute the voice mixer.
|
||||
* Preference("voice mute", "disable") - Un-mute the voice mixer.
|
||||
* Preference("voice mute", "toggle") - Toggle voice mute.
|
||||
* Preference("voice mute", "toggle") - Toggle voice mute.
|
||||
|
||||
* Preference("music volume", 0.5) - Set the music volume.
|
||||
* Preference("sound volume", 0.5) - Set the sound volume.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# This file contains the spline motion code contributed by Aenakume, at
|
||||
# This file contains the spline motion code contributed by Aenakume, at
|
||||
# http://lemmasoft.renai.us/forums/viewtopic.php?f=8&t=3977
|
||||
|
||||
init -1080 python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains code that creates a few new statements. We'll
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file is responsible for creating and defining the default styles
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This file contains code for the style preferences system, which allows
|
||||
@@ -15,7 +15,8 @@ init -1135 python:
|
||||
|
||||
# Are style preferences dirty? If so, we need to update them at the start of
|
||||
# the next operation.
|
||||
__dirty = True
|
||||
__spdirty = object()
|
||||
__spdirty.flag = True
|
||||
|
||||
# A map from preference name to alternative.
|
||||
if persistent._style_preferences is None:
|
||||
@@ -71,9 +72,7 @@ init -1135 python:
|
||||
Called at least once per interaction, to update the styles if necessary.
|
||||
"""
|
||||
|
||||
global __dirty
|
||||
|
||||
if not __dirty:
|
||||
if not __spdirty.flag:
|
||||
return
|
||||
|
||||
for preference, alternatives in __preferences.iteritems():
|
||||
@@ -86,7 +85,7 @@ init -1135 python:
|
||||
|
||||
renpy.style.rebuild()
|
||||
|
||||
__dirty = False
|
||||
__spdirty.flag = False
|
||||
|
||||
def __check(preference, alternative=None):
|
||||
|
||||
@@ -112,12 +111,10 @@ init -1135 python:
|
||||
A string giving the name of the alternative.
|
||||
"""
|
||||
|
||||
global __dirty
|
||||
|
||||
__check(preference, alternative)
|
||||
|
||||
persistent._style_preferences[preference] = alternative
|
||||
__dirty = True
|
||||
__spdirty.flag = True
|
||||
|
||||
renpy.restart_interaction()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1110 python:
|
||||
@@ -724,6 +724,502 @@ init -1110 python hide:
|
||||
config.image_buttons = { }
|
||||
config.image_labels = { }
|
||||
|
||||
# Theme: A White Tulip
|
||||
# Coding: Jake Staines (http://www.eviscerate.net/)
|
||||
# Graphics: Ren (http://x-Ren-x.deviantart.com/)
|
||||
# Font: Andrew Paglinawan (www.andrewpaglinawan.com)
|
||||
init -1110 python:
|
||||
|
||||
def __AWTBox(colour):
|
||||
base_image = im.MatrixColor("_theme_awt/frame.png", im.matrix.opacity(0.45))
|
||||
colour_tint = im.MatrixColor("_theme_awt/frame.png", im.matrix.colorize(colour, colour))
|
||||
colour_tint = im.MatrixColor(colour_tint, im.matrix.opacity(0.4))
|
||||
frame_image = im.Composite(
|
||||
(220, 147),
|
||||
(0, 0), base_image,
|
||||
(0, 0), colour_tint,
|
||||
(0, 0), "_theme_awt/frame_overlay.png"
|
||||
)
|
||||
|
||||
return Frame(frame_image, 4, 4)
|
||||
|
||||
def __AWTButton(image, colour, highlight, low_sat=False):
|
||||
base_image = "_theme_awt/" + image + ".png"
|
||||
colour_tint = im.MatrixColor("_theme_awt/" + image + ".png", im.matrix.colorize(colour, colour))
|
||||
opacity = 0.5
|
||||
if highlight:
|
||||
opacity = 0.3
|
||||
if low_sat:
|
||||
opacity = opacity * 0.4
|
||||
colour_tint = im.MatrixColor(colour_tint, im.matrix.opacity(opacity))
|
||||
if highlight:
|
||||
button_image = im.Composite(
|
||||
(203, 47),
|
||||
(0, 0), base_image,
|
||||
(0, 0), colour_tint,
|
||||
(0, 0), "_theme_awt/" + image + "_overlay_highlight.png"
|
||||
)
|
||||
else:
|
||||
button_image = im.Composite(
|
||||
(203, 47),
|
||||
(0, 0), base_image,
|
||||
(0, 0), colour_tint,
|
||||
(0, 0), "_theme_awt/" + image + "_overlay.png"
|
||||
)
|
||||
|
||||
return Frame(button_image, 4, 6)
|
||||
|
||||
def __AWTBullet(image):
|
||||
return Transform(image, yalign=0.5, xalign=0.0)
|
||||
|
||||
init -1110 python hide:
|
||||
|
||||
@theme
|
||||
def a_white_tulip_frames(frame):
|
||||
|
||||
theme.clear_frames()
|
||||
|
||||
style.frame.background = __AWTBox(frame)
|
||||
|
||||
style.frame.xpadding = 9
|
||||
style.frame.ypadding = 9
|
||||
|
||||
@theme
|
||||
def a_white_tulip_buttons(text_size,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text,
|
||||
small):
|
||||
|
||||
theme.clear_buttons()
|
||||
|
||||
style.button.background = __AWTButton("button", widget, False)
|
||||
style.button.hover_background = __AWTButton("button", widget_hover, True)
|
||||
style.button.selected_background = __AWTButton("button_selected", widget_hover, False, low_sat=True)
|
||||
style.button.selected_hover_background = __AWTButton("button_selected", widget_hover, True, low_sat=True)
|
||||
style.button.insensitive_background = __AWTButton("button", disabled, False)
|
||||
|
||||
style.button_text.font = "_theme_awt/Quicksand-Regular.ttf"
|
||||
style.button_text.size = text_size
|
||||
style.button_text.color = widget_text
|
||||
|
||||
style.button_text.selected_color = widget_text
|
||||
style.button_text.selected_xoffset = 2
|
||||
style.button_text.selected_yoffset = 2
|
||||
|
||||
style.button_text.insensitive_color = "#0000"
|
||||
|
||||
|
||||
style.button_text.outlines = [
|
||||
(2, "#20202008", 2, 2),
|
||||
(1, "#40404015", 2, 2),
|
||||
(0, "#80808030", 2, 2),
|
||||
(0, widget_text, 1, 0),
|
||||
|
||||
]
|
||||
|
||||
style.button_text.hover_outlines = [
|
||||
(2, "#20202008", 2, 2),
|
||||
(1, "#40404015", 2, 2),
|
||||
(0, "#80808030", 2, 2),
|
||||
(0, widget_text, 1, 0),
|
||||
]
|
||||
|
||||
style.button_text.selected_outlines = [
|
||||
(2, "#20202008", 2, 2),
|
||||
(1, "#40404015", 2, 2),
|
||||
(0, "#80808030", 2, 2),
|
||||
(0, widget_text, 1, 0),
|
||||
]
|
||||
|
||||
style.button_text.insensitive_outlines = [
|
||||
(1, "#fff4", 2, 1),
|
||||
(1, "#3334", 0, -1),
|
||||
]
|
||||
|
||||
|
||||
style.button.xpadding = 9
|
||||
|
||||
if small:
|
||||
style.button.ypadding = 2
|
||||
else:
|
||||
style.button.ypadding = 6
|
||||
|
||||
style.button.xmargin = 3
|
||||
style.button.ymargin = 3
|
||||
|
||||
style.button_text.xalign = 0.5
|
||||
style.button_text.yalign = 0.5
|
||||
style.button_text.text_align = 0.5
|
||||
|
||||
# Radio Buttons
|
||||
|
||||
def set_radio_style(s, colour):
|
||||
|
||||
selected = im.MatrixColor("_theme_awt/radio_base.png", im.matrix.colorize(colour, colour))
|
||||
selected = im.MatrixColor(selected, im.matrix.opacity(0.75))
|
||||
selected = im.Composite( (17, 18),
|
||||
(0, 0), "_theme_awt/radio_unselected.png",
|
||||
(0, 0), "_theme_awt/radio_base.png",
|
||||
(0, 0), selected,
|
||||
(0, 0), "_theme_awt/radio_base_overlay.png"
|
||||
)
|
||||
|
||||
hover = im.MatrixColor("_theme_awt/radio_base.png", im.matrix.colorize(colour, colour))
|
||||
hover = im.MatrixColor(hover, im.matrix.opacity(0.75))
|
||||
hover = im.Composite( (17, 18),
|
||||
(0, 0), "_theme_awt/radio_unselected.png",
|
||||
(0, 0), "_theme_awt/radio_base.png",
|
||||
(0, 0), hover,
|
||||
(0, 0), "_theme_awt/radio_selected_hover.png"
|
||||
)
|
||||
|
||||
s.background = __AWTBullet("_theme_awt/radio_unselected.png")
|
||||
s.hover_background = __AWTBullet("_theme_awt/radio_unselected_hover.png")
|
||||
s.insensitive_background = __AWTBullet("_theme_awt/radio_unselected.png")
|
||||
s.selected_background = __AWTBullet(selected)
|
||||
s.selected_hover_background = __AWTBullet(hover)
|
||||
|
||||
s.left_padding = 23
|
||||
s.left_margin = 10
|
||||
|
||||
def set_radio_text_style(s):
|
||||
s.selected_color = widget_text
|
||||
s.xoffset = 2
|
||||
s.yoffset = 2
|
||||
|
||||
|
||||
s.xalign = 0.0
|
||||
s.text_align = 0.0
|
||||
|
||||
set_radio_style(style.radio_button, widget)
|
||||
set_radio_text_style(style.radio_button_text)
|
||||
|
||||
set_radio_style(style.check_button, widget)
|
||||
set_radio_text_style(style.check_button_text)
|
||||
|
||||
@theme
|
||||
def a_white_tulip_large_buttons(text_size,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text,
|
||||
small):
|
||||
|
||||
theme.clear_large_buttons()
|
||||
|
||||
style.large_button.background = __AWTButton("button", widget, False)
|
||||
style.large_button.hover_background = __AWTButton("button", widget_hover, True)
|
||||
style.large_button.selected_background = __AWTButton("button_selected", widget_hover, False)
|
||||
style.large_button.selected_hover_background = __AWTButton("button_selected", widget_hover, True)
|
||||
style.large_button.insensitive_background = __AWTButton("button", disabled, False)
|
||||
|
||||
style.large_button_text.font = "_theme_awt/Quicksand-Regular.ttf"
|
||||
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.outlines = [
|
||||
(2, "#20202008", 2, 2),
|
||||
(1, "#40404015", 2, 2),
|
||||
(0, "#80808030", 2, 2),
|
||||
(0, widget_text, 1, 0),
|
||||
]
|
||||
|
||||
style.large_button_text.selected_outlines = [
|
||||
(2, "#20202008", 2, 2),
|
||||
(1, "#40404015", 2, 2),
|
||||
(0, "#80808030", 2, 2),
|
||||
(0, widget_selected, 1, 0),
|
||||
]
|
||||
|
||||
style.large_button_text.insensitive_outlines = [
|
||||
(2, "#20202008", 2, 2),
|
||||
(1, "#40404015", 2, 2),
|
||||
(0, "#80808030", 2, 2),
|
||||
(0, disabled_text, 1, 0),
|
||||
]
|
||||
|
||||
|
||||
style.large_button.xpadding = 9
|
||||
|
||||
if small:
|
||||
style.large_button.top_padding = 2
|
||||
style.large_button.bottom_padding = 4
|
||||
else:
|
||||
style.large_button.top_padding = 6
|
||||
style.large_button.bottom_padding = 9
|
||||
|
||||
style.large_button.xmargin = 3
|
||||
style.large_button.ymargin = 3
|
||||
|
||||
style.large_button_text.xalign = 0.5
|
||||
style.large_button_text.yalign = 0.5
|
||||
style.large_button_text.text_align = 0.5
|
||||
|
||||
@theme
|
||||
def a_white_tulip_labels(
|
||||
text_size,
|
||||
label):
|
||||
|
||||
theme.clear_labels()
|
||||
|
||||
style.label_text.size = text_size
|
||||
style.label_text.color = label
|
||||
style.label_text.outlines = [
|
||||
(0, label, 1, 0),
|
||||
(1, "#FFF", 0, 0),
|
||||
(1, "#FFF", 1, 0),
|
||||
(2, "#FFF4", 0, 0),
|
||||
(2, "#FFF4", 1, 0),
|
||||
|
||||
]
|
||||
|
||||
style.label.bottom_margin = 5
|
||||
|
||||
@theme
|
||||
def a_white_tulip_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 a_white_tulip_bars(
|
||||
widget,
|
||||
widget_hover):
|
||||
|
||||
theme.clear_bars()
|
||||
|
||||
def img(name, colour, width, height, x, y):
|
||||
i = im.MatrixColor("_theme_awt/" + name + ".png", im.matrix.colorize(colour, colour))
|
||||
i = im.MatrixColor(i, im.matrix.opacity(0.5))
|
||||
i = im.Composite(
|
||||
(width, height),
|
||||
(0, 0), "_theme_awt/" + name + ".png",
|
||||
(0, 0), i,
|
||||
)
|
||||
if x is not None:
|
||||
i = Frame(i, x, y, tile=True)
|
||||
return i
|
||||
|
||||
def himg(name, colour, width, height, x, y):
|
||||
i = im.MatrixColor("_theme_awt/" + name + ".png", im.matrix.colorize(colour, colour))
|
||||
i = im.MatrixColor(i, im.matrix.opacity(0.5))
|
||||
i = im.Composite(
|
||||
(width, height),
|
||||
(0, 0), "_theme_awt/" + name + ".png",
|
||||
(0, 0), i,
|
||||
(0, 0), "_theme_awt/" + name + "_overlay.png"
|
||||
)
|
||||
if x is not None:
|
||||
i = Frame(i, x, y, tile=True)
|
||||
return i
|
||||
|
||||
# Bars.
|
||||
style.bar.ymaximum = 27
|
||||
style.bar.left_gutter = 14
|
||||
style.bar.right_gutter = 12
|
||||
style.bar.thumb_offset = 10
|
||||
|
||||
style.bar.left_bar = himg("bar_full", widget, 42, 27, 13, 0)
|
||||
style.bar.right_bar = Frame("_theme_awt/slider_empty_all.png", 13, 0, tile=True)
|
||||
style.bar.thumb = himg("bar_thumb", widget, 20, 25, None, None)
|
||||
|
||||
style.vbar.xmaximum = 27
|
||||
style.vbar.top_gutter = 11
|
||||
style.vbar.bottom_gutter = 14
|
||||
style.vbar.thumb_offset = 10
|
||||
|
||||
style.vbar.right_bar = himg("v_bar_full", widget, 27, 42, 0, 15)
|
||||
style.vbar.left_bar = Frame("_theme_awt/vslider_empty_all.png", 0, 13, tile=True)
|
||||
style.vbar.thumb = himg("v_bar_thumb", widget, 25, 20, None, None)
|
||||
|
||||
|
||||
# Sliders
|
||||
style.slider.ymaximum = 27
|
||||
style.slider.left_gutter = 13
|
||||
style.slider.right_gutter = 12
|
||||
style.slider.thumb_offset = 14.5
|
||||
|
||||
style.slider.left_bar = himg("slider_full", widget, 42, 27, 13, 0)
|
||||
style.slider.right_bar = Frame("_theme_awt/slider_empty_all.png", 13, 0, tile=True)
|
||||
style.slider.thumb = himg("vthumb", widget, 29, 30, None, None)
|
||||
|
||||
style.slider.hover_left_bar = himg("slider_full", widget_hover, 42, 27, 13, 0)
|
||||
style.slider.hover_thumb = himg("vthumb", widget_hover, 29, 30, None, None)
|
||||
|
||||
style.vslider.xmaximum = 27
|
||||
style.vslider.top_gutter = 14
|
||||
style.vslider.bottom_gutter = 10
|
||||
style.vslider.thumb_offset = 15
|
||||
|
||||
style.vslider.right_bar = himg("vslider_full", widget, 27, 42, 0, 13)
|
||||
style.vslider.left_bar = Frame("_theme_awt/vslider_empty_all.png", 0, 13, tile=True)
|
||||
style.vslider.thumb = himg("vthumb", widget, 29, 30, None, None)
|
||||
|
||||
style.vslider.hover_right_bar = himg("vslider_full", widget_hover, 27, 42, 0, 13)
|
||||
style.vslider.hover_thumb = himg("vthumb", widget_hover, 29, 30, None, None)
|
||||
|
||||
# Scrollbars.
|
||||
style.scrollbar.left_gutter = 30
|
||||
style.scrollbar.right_gutter = 30
|
||||
style.scrollbar.thumb_offset = 32.5
|
||||
style.scrollbar.ymaximum = 27
|
||||
|
||||
style.scrollbar.left_bar = Frame("_theme_awt/slider_empty_all.png", 13, 0, tile=True)
|
||||
style.scrollbar.right_bar = Frame("_theme_awt/slider_empty_all.png", 13, 0, tile=True)
|
||||
style.scrollbar.thumb = himg("scroller", widget, 65, 29, None, None)
|
||||
|
||||
style.scrollbar.hover_left_bar = Frame("_theme_awt/slider_empty_all.png", 13, 0, tile=True)
|
||||
style.scrollbar.hover_thumb = himg("scroller", widget_hover, 65, 29, None, None)
|
||||
|
||||
style.vscrollbar.top_gutter = 30
|
||||
style.vscrollbar.bottom_gutter = 29
|
||||
style.vscrollbar.thumb_offset = 32.5
|
||||
style.vscrollbar.xmaximum = 27
|
||||
|
||||
style.vscrollbar.left_bar = Frame("_theme_awt/vslider_empty_all.png", 0, 13, tile=True)
|
||||
style.vscrollbar.right_bar = Frame("_theme_awt/vslider_empty_all.png", 0, 13, tile=True)
|
||||
style.vscrollbar.thumb = himg("vscroller", widget, 28, 65, None, None)
|
||||
|
||||
style.vscrollbar.hover_left_bar = Frame("_theme_awt/vslider_empty_all.png", 0, 13, tile=True)
|
||||
style.vscrollbar.hover_thumb = himg("vscroller", widget_hover, 28, 65, None, None)
|
||||
|
||||
@theme
|
||||
def a_white_tulip(
|
||||
widget = "#c1c6d3",
|
||||
widget_hover = "#d7dbe5",
|
||||
widget_text = "#6b6b6b",
|
||||
widget_selected = "#c1c6d3",
|
||||
disabled = "#b4b4b4",
|
||||
disabled_text = "#6b6b6b",
|
||||
label = "#6b6b6b",
|
||||
frame = "#9391c9",
|
||||
text_size=None,
|
||||
small_text_size=None,
|
||||
window = None,
|
||||
button_menu = None,
|
||||
mm_root = "#ffffff",
|
||||
gm_root = "#ffffff",
|
||||
|
||||
# for compatibility - unused:
|
||||
**properties
|
||||
):
|
||||
|
||||
# First off, we're hard-coding the text because we're already making everything
|
||||
# brighter and whiter than it was before, so light-coloured text - even when it was
|
||||
# previously over a dark background - just won't look right.
|
||||
|
||||
widget_text = "#636363"
|
||||
disabled_text = "#6b6b6b"
|
||||
label = "#6b6b6b"
|
||||
|
||||
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()
|
||||
|
||||
small = False
|
||||
|
||||
if config.screen_width <= 640:
|
||||
text_size = text_size or 12
|
||||
small_text_size = small_text_size or 8
|
||||
small = True
|
||||
else:
|
||||
text_size = text_size or 17
|
||||
small_text_size = small_text_size or 12
|
||||
|
||||
theme.a_white_tulip_frames(frame)
|
||||
|
||||
theme.a_white_tulip_buttons(
|
||||
text_size,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text,
|
||||
small)
|
||||
|
||||
theme.a_white_tulip_large_buttons(
|
||||
small_text_size,
|
||||
widget,
|
||||
widget_hover,
|
||||
widget_text,
|
||||
widget_selected,
|
||||
disabled,
|
||||
disabled_text,
|
||||
small)
|
||||
|
||||
theme.a_white_tulip_labels(
|
||||
text_size,
|
||||
label)
|
||||
|
||||
theme.a_white_tulip_prompts(
|
||||
text_size,
|
||||
label)
|
||||
|
||||
theme.a_white_tulip_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 None:
|
||||
window = frame
|
||||
|
||||
style.window.background = __AWTBox(window)
|
||||
style.window.xpadding = 9
|
||||
style.window.xmargin = 6
|
||||
style.window.top_padding = 9
|
||||
style.window.bottom_padding = 35
|
||||
style.window.ymargin = 6
|
||||
|
||||
style.say_dialogue.font = "_theme_awt/Quicksand-Regular.ttf"
|
||||
style.say_dialogue.color = widget_text
|
||||
style.say_dialogue.outlines = [
|
||||
(0, widget_text, 1, 0)
|
||||
]
|
||||
|
||||
style.say_label.font = "_theme_awt/Quicksand-Bold.ttf"
|
||||
style.say_label.color = widget_text
|
||||
style.say_label.outlines = [
|
||||
(2, "#20202008", 2, 2),
|
||||
(1, "#40404015", 2, 2),
|
||||
(0, "#80808030", 2, 2)
|
||||
]
|
||||
|
||||
if button_menu:
|
||||
layout.button_menu()
|
||||
|
||||
style.quick_button.bottom_margin = 15
|
||||
style.quick_button.right_margin = 15
|
||||
|
||||
style.file_picker_text.first_indent = 9
|
||||
style.file_picker_text.rest_indent = 9
|
||||
|
||||
|
||||
init 1110 python:
|
||||
|
||||
if not "compat" in _layout.provided:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# This extra contains a basic implementation of voice support. Right
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init -1170 python hide:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# Copyright 2004-2011 Tom Rothamel
|
||||
# Copyright 2004-2012 Tom Rothamel
|
||||
#
|
||||
# Please see the LICENSE.txt distributed with Ren'Py for permission to
|
||||
# copy and modify.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python hide:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
# Copyright 2004-2011 Tom Rothamel
|
||||
# Copyright 2004-2012 Tom Rothamel
|
||||
#
|
||||
# Please see the LICENSE.txt distributed with Ren'Py for permission to
|
||||
# copy and modify.
|
||||
|
||||
@@ -57,7 +57,7 @@ label _debugger_screen:
|
||||
|
||||
entries = [ ]
|
||||
|
||||
ebc = renpy.game.log.ever_been_changed
|
||||
ebc = store.__dict__.ever_been_changed
|
||||
ebc = list(ebc)
|
||||
ebc.sort()
|
||||
|
||||
@@ -78,7 +78,10 @@ label _debugger_screen:
|
||||
continue
|
||||
|
||||
val = aRepr.repr(getattr(store, var))
|
||||
entries.append((0, (var + " = " + val).replace("{", "{{")))
|
||||
s = (var + " = " + val)
|
||||
s = s.replace("{", "{{")
|
||||
s = s.replace("[", "[[")
|
||||
entries.append((0, s))
|
||||
|
||||
if entries:
|
||||
vp = ui.viewport(mousewheel=True)
|
||||
@@ -161,7 +164,7 @@ label _theme_test:
|
||||
|
||||
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)
|
||||
layout.prompt("This is a prompt. We've made this text long enough to wrap around so it fills multiple lines.", None)
|
||||
ui.close()
|
||||
|
||||
ui.close() # hbox
|
||||
@@ -207,29 +210,11 @@ label _style_hierarchy:
|
||||
ui.interact()
|
||||
|
||||
jump _developer_screen
|
||||
|
||||
|
||||
init -1050 python:
|
||||
config.missing_background = "black"
|
||||
|
||||
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
|
||||
|
||||
|
||||
if config.developer:
|
||||
|
||||
@@ -257,7 +242,7 @@ init 1050 python:
|
||||
renpy.show(name, what=config.missing_background)
|
||||
__missing_scene = False
|
||||
|
||||
what = " ".join(what).replace("{", "{{")
|
||||
what = " ".join(what).replace("{", "{{").replace("[", "[[")
|
||||
__missing()[name[0]] = what
|
||||
return True
|
||||
|
||||
@@ -455,7 +440,7 @@ label _image_location_picker:
|
||||
|
||||
for fn in image_files:
|
||||
ui.button(clicked=ui.returns(fn), size_group="files", xminimum=1.0)
|
||||
ui.text(fn.replace("{", "{{"), style="button_text", xalign=0.0)
|
||||
ui.text(fn.replace("{", "{{").replace("[", "[["), style="button_text", xalign=0.0)
|
||||
|
||||
ui.close()
|
||||
|
||||
@@ -496,8 +481,8 @@ label _filename_list:
|
||||
for fn in files:
|
||||
fn = os.path.join(dirname, fn)
|
||||
fn = fn[len(config.gamedir) + 1:]
|
||||
print >>f, fn
|
||||
print fn
|
||||
print >>f, fn.encode("utf-8", "replace")
|
||||
print fn.encode("utf-8", "replace")
|
||||
|
||||
f.close()
|
||||
|
||||
@@ -534,7 +519,7 @@ screen _inspector:
|
||||
"style=%s, " % (__format_style(d.style),) +
|
||||
"size=(%dx%d)" % (width, height) )
|
||||
|
||||
text t
|
||||
text "[t!q]"
|
||||
|
||||
null height 20
|
||||
|
||||
@@ -542,8 +527,34 @@ screen _inspector:
|
||||
|
||||
python:
|
||||
ui.saybehavior()
|
||||
|
||||
|
||||
|
||||
init python:
|
||||
def _image_load_log_function(st, at):
|
||||
|
||||
ill = list(renpy.get_image_load_log(3))
|
||||
|
||||
if not ill:
|
||||
return Null(), .25
|
||||
|
||||
vbox = VBox()
|
||||
|
||||
for when, filename, preload in ill:
|
||||
if preload:
|
||||
color="#ffffff"
|
||||
else:
|
||||
color="#ffcccc"
|
||||
|
||||
vbox.add(Text(filename.replace("{", "{{").replace("[", "[["), size=12, color=color, style="_default"))
|
||||
|
||||
rv = Window(vbox, style="_frame", background="#0004", xpadding=5, ypadding=5, xminimum=200)
|
||||
return rv, .25
|
||||
|
||||
screen _image_load_log:
|
||||
zorder 1000
|
||||
|
||||
add DynamicDisplayable(_image_load_log_function)
|
||||
|
||||
|
||||
init python:
|
||||
|
||||
def __format_style(s):
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
#
|
||||
# This file contains the code for in-game Ren'Py error handling. It's a
|
||||
# module (as opposed to a .rpy file) because that allows us to ensure
|
||||
# that it is fully loaded or run before any other Ren'Py code runs.
|
||||
|
||||
|
||||
|
||||
# These styles define the look of the Ren'Py in-game interface (the
|
||||
# amie2 look). Despite being defined here (so they're available for
|
||||
# error handling), they may be used in other code, like the launcher.
|
||||
# amie2-inspired look). They're also used in the launcher.
|
||||
init python:
|
||||
# default
|
||||
style._default = Style(None)
|
||||
@@ -37,7 +38,7 @@ init python:
|
||||
style._default.text_y_fudge = 0
|
||||
style._default.first_indent = 0
|
||||
style._default.rest_indent = 0
|
||||
style._default.line_spacing = 4
|
||||
style._default.line_spacing = 0
|
||||
style._default.line_leading = 0
|
||||
style._default.line_overlap_split = 0
|
||||
style._default.layout = "tex"
|
||||
@@ -97,16 +98,14 @@ init python:
|
||||
style._default.activate_sound = None
|
||||
style._default.clipping = False
|
||||
|
||||
|
||||
|
||||
##########################################################################
|
||||
|
||||
# frame
|
||||
style._frame = Style(style._default)
|
||||
style._frame.background = Frame("_theme_amie2/frame.png", 40, 40)
|
||||
style._frame.xmargin = 10
|
||||
style._frame.ymargin = 10
|
||||
style._frame.xpadding = 20
|
||||
style._frame.xmargin = 0
|
||||
style._frame.ymargin = 0
|
||||
style._frame.xpadding = 15
|
||||
style._frame.ypadding = 10
|
||||
|
||||
# text
|
||||
@@ -136,29 +135,40 @@ init python:
|
||||
style._button_text.size = 16
|
||||
style._button_text.color = "#111"
|
||||
style._button_text.selected_color = "#11f"
|
||||
style._button_text.insensitive_color = "#ccc"
|
||||
style._button_text.xalign = 0.5
|
||||
style._button_text.yoffset = 2
|
||||
|
||||
style._button_text.yoffset = 0
|
||||
|
||||
# label
|
||||
style._label = Style(style._default)
|
||||
style._label_text = Style(style._default)
|
||||
|
||||
style._label.top_margin = 10
|
||||
style._label.bottom_margin = 5
|
||||
style._label_text.size = 20
|
||||
|
||||
style._label_text.color = "#000"
|
||||
style._label_text.bold = True
|
||||
|
||||
# bar
|
||||
style._bar = Style(style._default)
|
||||
style._scrollbar = Style(style._bar)
|
||||
style._vscrollbar = Style(style._bar)
|
||||
|
||||
style._bar.left_bar = Frame("_theme_amie2/bar.png", 10, 10)
|
||||
style._bar.left_bar = Frame("_theme_amie2/hover_frame.png", 10, 10)
|
||||
style._bar.right_bar = Frame("_theme_amie2/bar.png", 10, 10)
|
||||
style._bar.thumb = Frame("_theme_amie2/button.png", 10, 10)
|
||||
style._bar.thumb_offset = 10
|
||||
style._bar.left_gutter = 5
|
||||
style._bar.right_gutter = 5
|
||||
style._bar.unscrollable = "hide"
|
||||
style._bar.thumb = None
|
||||
style._bar.hover_thumb = None
|
||||
style._bar.ymaximum = 20
|
||||
|
||||
style._scrollbar = Style(style._default)
|
||||
style._vscrollbar = Style(style._default)
|
||||
|
||||
style._scrollbar.left_bar = Frame("_theme_amie2/bar.png", 10, 10)
|
||||
style._scrollbar.right_bar = Frame("_theme_amie2/bar.png", 10, 10)
|
||||
style._scrollbar.thumb = Frame("_theme_amie2/frame.png", 10, 10)
|
||||
style._scrollbar.hover_thumb = Frame("_theme_amie2/hover_frame.png", 10, 10)
|
||||
style._scrollbar.thumb_offset = 10
|
||||
style._scrollbar.left_gutter = 5
|
||||
style._scrollbar.right_gutter = 5
|
||||
style._scrollbar.unscrollable = "hide"
|
||||
|
||||
style._scrollbar.ymaximum = 20
|
||||
style._vscrollbar.xmaximum = 20
|
||||
@@ -187,11 +197,9 @@ init python hide:
|
||||
line = int(line)
|
||||
|
||||
renpy.launch_editor([ filename ], line)
|
||||
|
||||
|
||||
style._default.hyperlink_functions = (hyperlink_styler, hyperlink_function, None)
|
||||
|
||||
|
||||
init python:
|
||||
|
||||
# Null translation function. This gets redefined once things start
|
||||
@@ -209,8 +217,7 @@ init python:
|
||||
rv = [ "{b}" + lines[0] + "{/b}" ]
|
||||
|
||||
for i in lines[1:]:
|
||||
if config.editor:
|
||||
i = re.sub(r'(File "(.*)", line (\d+))', r'{a=edit:\3:\2}\1{/a}', i)
|
||||
i = re.sub(r'(File "(.*)", line (\d+))', r'{a=edit:\3:\2}\1{/a}', i)
|
||||
rv.append(i)
|
||||
|
||||
return "\n".join(rv)
|
||||
@@ -256,42 +263,22 @@ init python:
|
||||
rv += "\n"
|
||||
|
||||
|
||||
if config.editor:
|
||||
rv = re.sub(r'(File "(.*)", line (\d+))', r'{a=edit:\3:\2}\1{/a}', rv)
|
||||
rv = re.sub(r'(File "(.*)", line (\d+))', r'{a=edit:\3:\2}\1{/a}', rv)
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
# Opens the traceback.txt file in an editor.
|
||||
def __open_traceback():
|
||||
try:
|
||||
if config.editor:
|
||||
renpy.launch_editor([ 'traceback.txt' ], 1, transient=1)
|
||||
else:
|
||||
os.startfile('traceback.txt')
|
||||
except:
|
||||
pass
|
||||
|
||||
# Opens the errors.txt file in an editor.
|
||||
def __open_parse_errors():
|
||||
try:
|
||||
if config.editor:
|
||||
renpy.launch_editor([ 'errors.txt' ], 1, transient=1)
|
||||
else:
|
||||
os.startfile('errors.txt')
|
||||
except:
|
||||
pass
|
||||
|
||||
def __can_open_traceback():
|
||||
if config.editor:
|
||||
return True
|
||||
class __EditFile(Action):
|
||||
def __init__(self, filename):
|
||||
self.filename = filename
|
||||
|
||||
import os
|
||||
def __call__(self):
|
||||
try:
|
||||
renpy.launch_editor([ self.filename ], 1, transient=1)
|
||||
except:
|
||||
pass
|
||||
|
||||
if hasattr(os, 'startfile'):
|
||||
return True
|
||||
|
||||
return False
|
||||
def __can_open_traceback():
|
||||
return True
|
||||
|
||||
# The transform used for errors. ATL isn't ready yet.
|
||||
def __transform_function(state, st, at):
|
||||
@@ -421,10 +408,9 @@ screen _exception:
|
||||
action reload_action
|
||||
hovered tt.action(_("Reloads the game from disk, saving and restoring game state if possible."))
|
||||
|
||||
if __can_open_traceback():
|
||||
textbutton _("Open Traceback"):
|
||||
action __open_traceback
|
||||
hovered tt.action(_("Opens the traceback.txt file in a text editor."))
|
||||
textbutton _("Open Traceback"):
|
||||
action __EditFile(traceback_fn)
|
||||
hovered tt.action(_("Opens the traceback.txt file in a text editor."))
|
||||
|
||||
null width 30
|
||||
|
||||
@@ -465,7 +451,7 @@ screen _parse_errors:
|
||||
mousewheel True
|
||||
|
||||
has vbox
|
||||
text fmt_errors
|
||||
text fmt_errors substitute False
|
||||
|
||||
bar:
|
||||
style "_vscrollbar"
|
||||
@@ -484,10 +470,9 @@ screen _parse_errors:
|
||||
action reload_action
|
||||
hovered tt.action(_("Reloads the game from disk, saving and restoring game state if possible."))
|
||||
|
||||
if __can_open_traceback():
|
||||
textbutton _("Open Parse Errors"):
|
||||
action __open_parse_errors
|
||||
hovered tt.action(_("Opens the errors.txt file in a text editor."))
|
||||
textbutton _("Open Parse Errors"):
|
||||
action __EditFile(error_fn)
|
||||
hovered tt.action(_("Opens the errors.txt file in a text editor."))
|
||||
|
||||
null width 30
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python hide:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python hide:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python hide:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2011 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
|
||||
# See LICENSE.txt for license details.
|
||||
|
||||
init python:
|
||||
|
||||
|
After Width: | Height: | Size: 358 B |
|
After Width: | Height: | Size: 474 B |
@@ -0,0 +1,94 @@
|
||||
Copyright (c) 2011, Andrew Paglinawan (www.andrewpaglinawan.com),
|
||||
with Reserved Font Name "Quicksand".
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
After Width: | Height: | Size: 404 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 86 B |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 719 B |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 298 B |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 293 B |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 765 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 963 B |
|
After Width: | Height: | Size: 997 B |
|
After Width: | Height: | Size: 318 B |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 308 B |
|
After Width: | Height: | Size: 552 B |
|
After Width: | Height: | Size: 674 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 958 B |
|
After Width: | Height: | Size: 714 B |
|
After Width: | Height: | Size: 993 B |
|
After Width: | Height: | Size: 453 B |
|
After Width: | Height: | Size: 1.6 KiB |
@@ -1,4 +1,4 @@
|
||||
#!/home/tom/bin/renpython -O
|
||||
#!/home/tom/bin/renpython
|
||||
# Builds a distributions of Ren'Py.
|
||||
|
||||
import sys
|
||||
@@ -9,11 +9,11 @@ import zlib
|
||||
import compileall
|
||||
import shutil
|
||||
import subprocess
|
||||
import makeupdate
|
||||
import glob
|
||||
import time
|
||||
import argparse
|
||||
|
||||
CWD = os.getcwdu()
|
||||
|
||||
zlib.Z_DEFAULT_COMPRESSION = 9
|
||||
|
||||
# Gets the data for the given file.
|
||||
@@ -116,148 +116,152 @@ def tree(root):
|
||||
def main():
|
||||
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument("version")
|
||||
ap.add_argument("--fast", action="store_true")
|
||||
ap.add_argument("prefix")
|
||||
|
||||
args = ap.parse_args()
|
||||
|
||||
# Revision updating is done early, so we can do it even if the rest
|
||||
# of the program fails.
|
||||
|
||||
|
||||
# Determine the version. We grab the current revision, and if any
|
||||
# file has changed, bump it by 1.
|
||||
p = subprocess.Popen(["bzr", "revno"], stdout=subprocess.PIPE)
|
||||
revno = p.stdout.read().strip()
|
||||
revno = int(revno)
|
||||
p.wait()
|
||||
import renpy
|
||||
|
||||
p = subprocess.Popen(["bzr", "status", "-V"], stdout=subprocess.PIPE)
|
||||
status = p.stdout.read().strip()
|
||||
p.wait()
|
||||
match_version = ".".join(str(i) for i in renpy.version_tuple[:2]) #@UndefinedVariable
|
||||
zip_version = ".".join(str(i) for i in renpy.version_tuple[:3]) #@UndefinedVariable
|
||||
|
||||
s = subprocess.check_output([ "git", "describe", "--dirty", "--match", match_version ])
|
||||
parts = s.strip().split("-")
|
||||
vc_version = int(parts[1])
|
||||
|
||||
if status:
|
||||
revno += 1
|
||||
if parts[-1] == "dirty":
|
||||
vc_version += 1
|
||||
|
||||
with open("renpy/vc_version.py", "w") as f:
|
||||
f.write("vc_version = {}".format(vc_version))
|
||||
|
||||
reload(sys.modules['renpy.vc_version']) #@UndefinedVariable
|
||||
reload(sys.modules['renpy'])
|
||||
|
||||
# Check that the versions match.
|
||||
full_version = ".".join(str(i) for i in renpy.version_tuple) #@UndefinedVariable
|
||||
if args.version != "experimental" and not full_version.startswith(args.version):
|
||||
raise Exception("The command-line and Ren'Py versions do not match.")
|
||||
|
||||
print "Version {} ({})".format(args.version, full_version)
|
||||
|
||||
# Write the revno to the necessary files.
|
||||
f = file("lib/update-version.txt", "w")
|
||||
f.write("{revno}-{now} base\n".format(revno=revno, now=time.time()))
|
||||
f.close()
|
||||
|
||||
f = file("renpy/vc_version.py", "w")
|
||||
f.write("""\
|
||||
# The version of Ren'Py reported by the version control software.
|
||||
vc_version = {revno}
|
||||
""".format(revno=revno))
|
||||
f.close()
|
||||
|
||||
prefix = args.prefix
|
||||
|
||||
# Copy over the screens, to keep them up to date.
|
||||
shutil.copy("tutorial/game/screens.rpy", "template/game/screens.rpy")
|
||||
|
||||
# Copy in the windows version of zsync
|
||||
shutil.copy("../zsync.exe", "lib/windows-x86/zsync.exe")
|
||||
shutil.copy("../zsyncmake.exe", "lib/windows-x86/zsyncmake.exe")
|
||||
|
||||
# Compile all the python files.
|
||||
compileall.compile_dir("renpy/", ddir="renpy/", force=1)
|
||||
|
||||
# os.environ['RENPY_PATH_ELIDE'] = '/home/tom/ab/renpy:' + prefix
|
||||
|
||||
# Chmod the mac app.
|
||||
os.chmod("./renpy.app/Contents/MacOS/Ren'Py Launcher", 0755)
|
||||
|
||||
# Chmod down renpy.py, for now.
|
||||
os.chmod("renpy.py", 0644)
|
||||
compileall.compile_dir("renpy/", ddir="renpy/", force=1, quiet=1)
|
||||
|
||||
# Compile the various games
|
||||
for i in [ 'tutorial/game', 'launcher', 'template/game', 'the_question/game' ]:
|
||||
os.system("./renpy.sh --compile --game " + i)
|
||||
|
||||
files = [ ]
|
||||
more_files = [ ]
|
||||
if not args.fast:
|
||||
for i in [ 'tutorial', 'launcher', 'template', 'the_question' ]:
|
||||
print "Compiling", i
|
||||
subprocess.check_call(["./renpy.sh", i, "compile" ])
|
||||
|
||||
# files.append("CHANGELOG.txt")
|
||||
files.append("LICENSE.txt")
|
||||
files.extend(tree("common"))
|
||||
files.extend(tree("launcher"))
|
||||
files.extend(tree("tutorial"))
|
||||
files.extend(tree("the_question"))
|
||||
|
||||
more_files.extend(tree("jedit"))
|
||||
more_files.extend(tree("lib"))
|
||||
more_files.extend(tree("lib/linux-x86"))
|
||||
# The destination directory.
|
||||
destination = os.path.join("dl", args.version)
|
||||
|
||||
module_files = [
|
||||
"README.txt",
|
||||
"*.c",
|
||||
"gen/*.c",
|
||||
"*.h",
|
||||
"*.py*",
|
||||
"include/*.pxd",
|
||||
"pysdlsound/*.py",
|
||||
"pysdlsound/*.pyx",
|
||||
]
|
||||
if not os.path.exists(destination):
|
||||
os.makedirs(destination)
|
||||
|
||||
for i in module_files:
|
||||
files.extend(glob.glob('module/' + i))
|
||||
if args.fast:
|
||||
|
||||
files.extend(tree('renpy'))
|
||||
files.append('renpy.py')
|
||||
cmd = [
|
||||
"./renpy.sh",
|
||||
"launcher",
|
||||
"distribute",
|
||||
"launcher",
|
||||
"--package",
|
||||
"sdk",
|
||||
"--destination",
|
||||
destination,
|
||||
"--no-update",
|
||||
]
|
||||
|
||||
more_files.append('python26.dll')
|
||||
more_files.append('msvcr90.dll')
|
||||
more_files.append('Microsoft.VC90.CRT.manifest')
|
||||
more_files.extend(tree('renpy.app'))
|
||||
more_files.append('renpy.exe')
|
||||
more_files.append("console.exe")
|
||||
more_files.append('renpy.sh')
|
||||
else:
|
||||
cmd = [
|
||||
"./renpy.sh",
|
||||
"launcher",
|
||||
"distribute",
|
||||
"launcher",
|
||||
"--destination",
|
||||
destination,
|
||||
]
|
||||
|
||||
print
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
files.extend(tree('template'))
|
||||
files.extend(tree('doc'))
|
||||
# Sign the update.
|
||||
if not args.fast:
|
||||
subprocess.check_call([
|
||||
"scripts/sign_update.py",
|
||||
"/home/tom/ab/keys/renpy_private.pem",
|
||||
os.path.join(destination, "updates.json"),
|
||||
])
|
||||
|
||||
files.sort()
|
||||
more_files.sort()
|
||||
|
||||
for fn in files + more_files:
|
||||
if "~" in fn or "#" in fn:
|
||||
raise Exception("Bad filename {0}.".format(fn))
|
||||
|
||||
zipup("dists/" + prefix + "-sdk.zip", prefix, files + more_files)
|
||||
# Write 7z.exe.
|
||||
sdk = "renpy-{}-sdk".format(zip_version)
|
||||
|
||||
if not args.fast:
|
||||
print "----"
|
||||
tarup("dists/" + prefix + "-sdk.tar.bz2", prefix, files + more_files)
|
||||
print "----"
|
||||
tarup("dists/" + prefix + "-source.tar.bz2", prefix, files)
|
||||
print "----"
|
||||
|
||||
# Make the 7zip.
|
||||
os.chdir("dists")
|
||||
os.system("unzip " + prefix + "-sdk.zip")
|
||||
|
||||
try:
|
||||
os.unlink(prefix + "-sdk.7z")
|
||||
except:
|
||||
pass
|
||||
|
||||
os.system("7z a " + prefix + "-sdk.7z " + prefix)
|
||||
os.system("cat ../7z.sfx " + prefix + "-sdk.7z > " + prefix + "-sdk.7z.exe""")
|
||||
os.unlink(prefix + "-sdk.7z")
|
||||
|
||||
os.chdir("..")
|
||||
|
||||
if os.path.exists("updates/prerelease"):
|
||||
shutil.rmtree("updates/prerelease")
|
||||
|
||||
os.rename("dists/" + prefix, "updates/prerelease")
|
||||
os.unlink("updates/prerelease/lib/update-version.txt")
|
||||
|
||||
makeupdate.make_update("updates/prerelease", str(revno))
|
||||
|
||||
os.chmod("renpy.py", 0755)
|
||||
shutil.copy("renpy-ppc.zip", os.path.join(destination, "renpy-ppc.zip"))
|
||||
|
||||
print
|
||||
print "Did you remember to rebuild the exe after the last change?"
|
||||
with open("7z.sfx", "rb") as f:
|
||||
sfx = f.read()
|
||||
|
||||
os.chdir(destination)
|
||||
|
||||
if os.path.exists(sdk):
|
||||
shutil.rmtree(sdk)
|
||||
|
||||
subprocess.check_call([ "unzip", "-q", sdk + ".zip" ])
|
||||
|
||||
if os.path.exists(sdk + ".7z"):
|
||||
os.unlink(sdk + ".7z")
|
||||
|
||||
sys.stdout.write("Creating -sdk.7z")
|
||||
|
||||
p = subprocess.Popen([ "7z", "a", sdk +".7z", sdk], stdout=subprocess.PIPE)
|
||||
for i, _l in enumerate(p.stdout):
|
||||
if i % 10 != 0:
|
||||
continue
|
||||
|
||||
sys.stdout.write(".")
|
||||
sys.stdout.flush()
|
||||
|
||||
if p.wait() != 0:
|
||||
raise Exception("7z failed")
|
||||
|
||||
with open(sdk + ".7z", "rb") as f:
|
||||
data = f.read()
|
||||
|
||||
with open(sdk + ".7z.exe", "wb") as f:
|
||||
f.write(sfx)
|
||||
f.write(data)
|
||||
|
||||
os.unlink(sdk + ".7z")
|
||||
shutil.rmtree(sdk)
|
||||
|
||||
else:
|
||||
os.chdir(destination)
|
||||
|
||||
if os.path.exists(sdk + ".7z.exe"):
|
||||
os.unlink(sdk + ".7z.exe")
|
||||
|
||||
print
|
||||
print "Did you run me with renpython -OO?"
|
||||
print "Did you update renpy.py and launcher/script_version.rpy?"
|
||||
print "Did you run with a RENPY_SCALE_FACTOR?"
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||