Compare commits

...

39 Commits

Author SHA1 Message Date
Tom Rothamel 366a09d708 Changes to get Ren'Py compiling with pygame_sdl2/sdl2. 2014-11-04 21:15:41 -05:00
Tom Rothamel 3fe3df9f23 Link to translation best practices. 2014-10-22 22:46:21 -04:00
Tom Rothamel e942545e39 changelog: Translation updates. 2014-10-21 22:33:09 -04:00
Tom Rothamel 9fe39eb8f3 Update changelog for 6.18.3. 2014-10-21 22:27:52 -04:00
Tom Rothamel b1b17bd9cc Remove translation TODOs. 2014-10-20 21:38:32 -04:00
Tom Rothamel 1b34b59f5e Merge pull request #482 from civalin/i10n/zh_TW
Traditional Chinese translation for launcher updated.
2014-10-20 21:36:25 -04:00
Tom Rothamel 719f06339c Merge pull request #481 from tlm-2501/patch-2
Updated Russian translation for preferences.rpy.
2014-10-20 21:36:07 -04:00
Tom Rothamel 7abba42bca Document showif. 2014-10-20 21:32:44 -04:00
Tom Rothamel c1120fc5b2 transform: Apply time adjustments on _hide, as well as render.
Fixes #484.

See: http://lemmasoft.renai.us/forums/viewtopic.php?p=343556#p343556
2014-10-19 23:07:10 -04:00
Tom Rothamel 7d29b8968a When in self-voicing mode, ignore {w} and {p} text tags.
These (especially the timed variants) tend to disrupt
text-to-speech. It's best to just have them speak in a
single block, whih is closest to the human speech pattern.

Fixes #483.
2014-10-19 11:40:46 -04:00
Tom Rothamel 994adf2ca5 Add the renpy.invoke_in_thread function. 2014-10-18 15:10:17 -04:00
Tom Rothamel bd55020512 Add updater.UpdateVersion.
This is a function that contacts an update server and determines
if there is an update available. It does this in a background thread,
so as to not make the game unresponsive.
2014-10-18 15:02:45 -04:00
Tom Rothamel b4f7d641b0 showif: Integrate with screen language.
This gives us a showif statement that applies the ShowIf displayable
to its children.
2014-10-17 23:12:13 -04:00
Tom Rothamel 1197cff85b showif: Rewrite showif.
We now simply deliver "appear", "show", and "hide" to the child,
rather than trying to exploit _hide. The advantage of doing it this
way is that we can preserve the hide state going into show, without
having to transfer it between transforms.
2014-10-17 22:15:53 -04:00
Tom Rothamel 5e8fc44fb3 Maintain hide_response and replaced_response over all transform renders.
This lets us simply query a transform to determine if it's blocking
hide/replaced, rather than having to update it in an unusual way.
2014-10-17 22:14:53 -04:00
Tom Rothamel 5df33b0f56 Only force us to stay in hide/replaced if a request happens.
This lets us issue "hide" to a transform by normal means, and override
it later.
2014-10-17 22:13:56 -04:00
Civa Lin fc9e826976 i10n: Traditional Chinese language for launcher updated. 2014-10-18 09:50:36 +08:00
Civa Lin e80d6f95a9 Merge branch 'master' into i10n/zh_TW 2014-10-18 09:47:33 +08:00
tlm-2501 8815e5efb8 Updated Russian translation for preferences.rpy. 2014-10-17 21:31:08 +04:00
Tom Rothamel 9874bc4dc3 WiP of ShowIf. 2014-10-16 22:54:22 -04:00
Tom Rothamel 82b597f62b Fix {Set,Toggle}ScreenVariable.
These functions were marked as pure, but weren't actually pure
functions, since the scope they update can change. This change
has them return objects, which are pure.
2014-10-16 22:41:31 -04:00
Tom Rothamel 4b35493447 The ATL on statement now takes a list of event names.
This will be useful for the upcoming showif displayable, which might
be used with transforms that contain "on start, idle:".
2014-10-15 20:17:28 -04:00
Tom Rothamel 69b203fbaa doc: Add warning about show layer and transform state.
Fixes #479.
2014-10-14 18:05:46 -04:00
Tom Rothamel 875a585e90 sl2: Use a newly-created context when predicting SLIf.
We had incorrectly used the original context, which led to the
contents of the predicted if statement showing up if the
statement was reused:

See: http://lemmasoft.renai.us/forums/viewtopic.php?f=32&t=28793
2014-10-14 17:46:32 -04:00
Tom Rothamel 935d065712 Transfer focus based on displayable replacement.
When a displayable in a screen that has focus/grab is replaced,
we transfer the focus to its replacement. This fixes a problem where
we would transfer grab only, which could lead to a permagrab condition.

Fixes #477.
2014-10-14 00:32:05 -04:00
Tom Rothamel c0c44896a8 Add _composite_parts for composite displayables.
For composite displayables (those with _main) set, this gives a list
of all components, other than the root widget, that make up the
displayable.
2014-10-13 23:55:40 -04:00
Tom Rothamel b7a9266bf3 Update changelog with new prediction stuff. 2014-10-12 13:26:42 -04:00
Tom Rothamel 8bf5f05270 While at the main menu, predict the start label.
This should provide a better experience in the start-new-game case,
which is the first thing a player will see.

Fixes #478.
2014-10-12 12:43:24 -04:00
Tom Rothamel 996d3c2fd6 Improve prediction of call/return.
We now model the return stack as part of the prediction process,
making it possible to perform prediction through a call and return
pair.

Fixes #288.
2014-10-12 01:30:01 -04:00
Tom Rothamel f68a4caec2 Check Side for correct parameters and children.
Fixes #476.
2014-10-11 22:17:44 -04:00
Tom Rothamel f06e5861e7 Bump versio to 6.18.3. 2014-10-11 17:13:07 -04:00
Daniel Luque a93f4f1f76 Merge pull request #475 from LuqueDaniel/update-es
Update es
2014-10-11 15:30:40 +02:00
Daniel Luque 572054c6e1 Update: templates/spanish/game/tl/none/common.rpy 2014-10-11 15:24:15 +02:00
Daniel Luque bc3f659f4b Update: launcher/game/tl/spanish/common.rpy 2014-10-11 15:19:24 +02:00
Tom Rothamel db63d0db4e Update changelog. 2014-10-09 22:28:02 -04:00
Tom Rothamel e7424e1140 Merge pull request #474 from civalin/i10n/zh_TW
Add Traditional Chinese translation.
2014-10-09 17:07:53 -04:00
Tom Rothamel c345b6a84c android: Log call errors to android.txt. 2014-10-08 23:21:02 -04:00
Civa Lin cefdc342b6 i10n: Traditional Chinese language for template. 2014-10-07 15:54:04 +08:00
Civa Lin 1c409025e1 i10n: Traditional Chinese language for launcher 2014-10-07 15:41:41 +08:00
75 changed files with 7164 additions and 508 deletions
+10 -1
View File
@@ -7,6 +7,7 @@ http://www.renpy.org
Ren'Py development takes place on the ``master`` branch, and occasionally
on feature branches.
Getting Started
===============
@@ -132,10 +133,18 @@ For example::
renpy.engine.warp_drive.engage(factor)
Translating
===========
For best practices when it comes to translating the launcher and template
game, please read:
http://lemmasoft.renai.us/forums/viewtopic.php?p=321603#p321603
Contributing
============
For bug fixes, documentation improvements, and simple changes, just
make a pull request. For more complex changes, it might make sense
to file an issue first so we can discuss the design.
+6 -1
View File
@@ -243,7 +243,12 @@ init python:
if yes:
kwargs["stdin"] = subprocess.PIPE
self.process = subprocess.Popen(cmd, cwd=RAPT_PATH, stdout=f, stderr=f, startupinfo=startupinfo, **kwargs)
try:
self.process = subprocess.Popen(cmd, cwd=RAPT_PATH, stdout=f, stderr=f, startupinfo=startupinfo, **kwargs)
except:
import traceback
traceback.print_exc(file=f)
raise
if yes:
import threading
+15 -1
View File
@@ -1,4 +1,3 @@
# TODO: Translation updated at 2013-12-08 21:52
translate russian strings:
@@ -62,3 +61,18 @@ translate russian strings:
old "Language:"
new "Язык:"
translate russian strings:
# game/preferences.rpy:91
old "Projects directory: [text]"
new "Папка проектов: [text]"
# game/preferences.rpy:114
old "Text editor: [text]"
new "Текстовый редактор: [text]"
# game/preferences.rpy:171
old "Large fonts"
new "Большие шрифты"
+4
View File
@@ -501,3 +501,7 @@ translate spanish strings:
old "Location"
new "Ubicación"
# renpy/common/00preferences.rpy:373
old "Self-voicing enabled. Press 'v' to disable."
new "Self-voicing activado. Presiona 'v' para desactivarlo."
@@ -0,0 +1,20 @@
DroidSansFallback.ttf is destributed under Apache License 2.0.
--------------------------------
Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
##########
This directory contains the fonts for the platform. They are licensed
under the Apache 2 license.
@@ -0,0 +1,15 @@
translate traditional_chinese strings:
# game/about.rpy:21
old "[version!q]"
new "[version!q]"
# game/about.rpy:25
old "View license"
new "檢視許可證"
# game/about.rpy:27
old "Back"
new "返回"
@@ -0,0 +1,23 @@
translate traditional_chinese strings:
# game/add_file.rpy:7
old "FILENAME"
new "檔案名稱"
# game/add_file.rpy:7
old "Enter the name of the script file to create."
new "請輸入需要建立的腳本名稱。"
# game/add_file.rpy:10
old "The filename must have the .rpy extension."
new "檔案名稱必須以 .rpy 為副檔名。"
# game/add_file.rpy:18
old "The file already exists."
new "該檔已存在。"
# game/add_file.rpy:21
old "# Ren'Py automatically loads all script files ending with .rpy. To use this\n# file, define a label and jump to it from another file.\n"
new "# Ren'Py 將自動載入以 .rpy 結尾的腳本。若要使用\n# 檔案,從其它檔案中定義一個標籤跳轉到該檔案。\n"
@@ -0,0 +1,161 @@
translate traditional_chinese strings:
# game/android.rpy:13
old "A 32-bit Java Development Kit is required to build Android packages on Windows. The JDK is different from the JRE, so it's possible you have Java without having the JDK.\n\nPlease {a=http://www.oracle.com/technetwork/java/javase/downloads/index.html}download and install the JDK{/a}, then restart the Ren'Py launcher."
new "需要一個32位元的 Java 開發套件(JDK)來在 Windows 中建立 Android 套件。JDK 不同於 JRE,所以您可能有 Java 但不包含 JDK。\n\n請 {a=http://www.oracle.com/technetwork/java/javase/downloads/index.html} 下載和安裝 JDK{/a},然後重新啟動 Ren'Py 啟動器。"
# game/android.rpy:14
old "To build Android packages, please download RAPT (from {a=http://www.renpy.org/dl/android}here{/a}), unzip it, and place it into the Ren'Py directory. Then restart the Ren'Py launcher."
new "要建立 Android 套件,請下載 RAPT(從{a=http://www.renpy.org/dl/android}這裡{/a}下載),解壓縮到 Ren'Py 目錄下。然後重新啟動 Ren'Py 啟動器。"
# game/android.rpy:15
old "RAPT has been installed, but you'll need to install the Android SDK before you can build Android packages. Choose Install SDK to do this."
new "RAPT 已經安裝了,但是您還需要安裝 Android SDK 才可以建立 Android 套件。選擇安裝 SDK 來實現它。"
# game/android.rpy:16
old "RAPT has been installed, but a key hasn't been configured. Please create a new key, or restore android.keystore."
new "RAPT 已經安裝了,但是 KEY 尚未設定。請建立一個新的 KEY,或者恢複 android.keystore。"
# game/android.rpy:17
old "The current project has not been configured. Use \"Configure\" to configure it before building."
new "當前專案尚未配置。使用「設定」,在建設之前配置它。"
# game/android.rpy:18
old "Choose \"Build\" to build the current project, or attach an Android device and choose \"Build & Install\" to build and install it on the device."
new "選擇「建立」來建立當前專案,或者選擇「建立並安裝」來添加到一個 Android 裝置中建立並安裝。"
# game/android.rpy:20
old "Attempts to emulate an Android phone.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button."
new "模擬一臺 Android 手機。\n\n當按鈕被按下時,觸控輸入會模擬為滑鼠。Esc 按鍵映射為手機的選單鍵,PageUp 鍵映射為手機的返回鍵。"
# game/android.rpy:21
old "Attempts to emulate an Android tablet.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button."
new "模擬一個 Android 平板。\n\n當按鈕被按下時,觸控輸入會模擬為滑鼠。Esc 按鍵映射為平板的選單鍵,PageUp 鍵映射為平板的返回鍵。"
# game/android.rpy:22
old "Attempts to emulate an OUYA console.\n\nController input is mapped to the arrow keys, Enter is mapped to the select button, Escape is mapped to the menu button, and PageUp is mapped to the back button."
new "模擬一個 OUYA 控制器。\n\n控制器的按鍵映射為 OUYA 的方向鍵,確認鍵映射為 OUYA 的 select 按鍵,Esc 按鍵映射為 OUYA 的選單鍵,PageUp 按鍵被映射到 OUYA 的返回鍵。"
# game/android.rpy:24
old "Downloads and installs the Android SDK and supporting packages. Optionally, generates the keys required to sign the package."
new "下載和安裝 Android SDK 以及支援套件。可選擇性地設定產生金鑰來簽署套件。"
# game/android.rpy:25
old "Configures the package name, version, and other information about this project."
new "設定套件名稱,版本以及其它關於專案的資訊。"
# game/android.rpy:26
old "Opens the file containing the Google Play keys in the editor.\n\nThis is only needed if the application is using an expansion APK. Read the documentation for more details."
new "在編輯器中開啟包含 Google Play keys 的檔案。\n\n這是在應用程式需要一個擴展的 APK 套件時才需要。閱讀檔案來瞭解更多細節。"
# game/android.rpy:27
old "Builds the Android package."
new "建立 Android 套件。"
# game/android.rpy:28
old "Builds the Android package, and installs it on an Android device connected to your computer."
new "建立 Android 套件,並安裝到已連線到電腦的 Android 裝置中。"
# game/android.rpy:148
old "{a=%s}%s{/a}"
new "{a=%s}%s{/a}"
# game/android.rpy:371
old "Android: [project.current.name!q]"
new "Android [project.current.name!q]"
# game/android.rpy:391
old "Emulation:"
new "模擬:"
# game/android.rpy:399
old "Phone"
new "手機"
# game/android.rpy:403
old "Tablet"
new "平板"
# game/android.rpy:407
old "Television / OUYA"
new "電視/OUYA"
# game/android.rpy:419
old "Build:"
new "建立:"
# game/android.rpy:427
old "Install SDK & Create Keys"
new "安裝 SDK 並創建金鑰"
# game/android.rpy:431
old "Configure"
new "設定"
# game/android.rpy:516
old "Other:"
new "其他:"
# game/android.rpy:435
old "Build Package"
new "建立套件"
# game/android.rpy:439
old "Build & Install"
new "建立並安裝"
translate traditional_chinese strings:
# game/android.rpy:30
old "To build Android packages, please download RAPT, unzip it, and place it into the Ren'Py directory. Then restart the Ren'Py launcher."
new "要建立 Android 套件,請下載 RAPT,解壓縮並將其放到 Ren'Py 目錄下,然後重新啟動 Ren'Py 啟動器。"
# game/android.rpy:506
old "Before packaging Android apps, you'll need to download RAPT, the Ren'Py Android Packaging Tool. Would you like to download RAPT now?"
new "在包裝 Android 應用程式前,您必須下載 RAPT(Ren'Py Android Packaging Tool)Ren'Py 的 Android 包裝程式。您要現在下載 RAPT 嗎?"
# game/android.rpy:39
old "Attempts to emulate a televison-based Android console, like the OUYA or Fire TV.\n\nController input is mapped to the arrow keys, Enter is mapped to the select button, Escape is mapped to the menu button, and PageUp is mapped to the back button."
new "模擬一臺基於 Android 的電視,例如 OUYA 或 Fire TV。\n\n控制器的按鍵映射為 OUYA 的方向鍵,確認鍵映射為 OUYA 的 select 按鍵,Esc 按鍵映射為 OUYA 的選單鍵,PageUp 按鍵被映射到 OUYA 的返回鍵。"
# game/android.rpy:524
old "Remote ADB Connect"
new "遠端 ADB 連接"
# game/android.rpy:528
old "Remote ADB Disconnect"
new "斷開遠端 ADB 連接"
# game/android.rpy:608
old "Remote ADB Address"
new "遠端 ADB 位址"
# game/android.rpy:609
old "Please enter the IP address and port number to connect to, in the form \"192.168.1.143:5555\". Consult your device's documentation to determine if it supports remote ADB, and if so, the address and port to use."
new "\"192.168.1.143:5555\" 是連接裝置的 IP 位址和埠的輸入形式。請鍵入裝置的 IP 位址和埠來連接。注意,確保裝置支援遠端 ADB,然後鍵入位址和埠來使用。"
# game/android.rpy:619
old "Invalid remote ADB address"
new "遠端 ADB 位址無效"
# game/android.rpy:619
old "The address must contain one exactly one ':'."
new "位址必須包含一個精確的 ':'。"
# game/android.rpy:623
old "The host may not contain whitespace."
new "主機位址不能包含空格。"
# game/android.rpy:629
old "The port must be a number."
new "埠必須是數位。"
# game/android.rpy:47
old "Connects to an Android device running ADB in TCP/IP mode."
new "在 TCP/IP 模式下運行 ADB Android 裝置。"
# game/android.rpy:48
old "Disconnects from an Android device running ADB in TCP/IP mode."
new "在 TCP/IP 模式下運行 ADB Android 裝置,並斷開連接。"
@@ -0,0 +1,43 @@
translate traditional_chinese strings:
# game/choose_theme.rpy:274
old "Could not change the theme. Perhaps options.rpy was changed too much."
new "無法更改介面主題。Options.rpy 也許改變了太多。"
# game/choose_theme.rpy:332
old "Display"
new "Display"
# game/choose_theme.rpy:333
old "Window"
new "Window"
# game/choose_theme.rpy:334
old "Fullscreen"
new "Fullscreen"
# game/choose_theme.rpy:335
old "Planetarium"
new "Planetarium"
# game/choose_theme.rpy:342
old "Sound Volume"
new "Sound Volume"
# game/choose_theme.rpy:376
old "Choose Theme"
new "Choose Theme"
# game/choose_theme.rpy:389
old "Theme"
new "介面主題"
# game/choose_theme.rpy:413
old "Color Scheme"
new "色彩配置"
# game/choose_theme.rpy:444
old "Continue"
new "繼續"
@@ -0,0 +1,510 @@
translate traditional_chinese strings:
# renpy/common/00action_file.rpy:118
old "%b %d, %H:%M"
new "%%m月%d日, %H:%M"
translate traditional_chinese strings:
# renpy/common/00gltest.rpy:50
old "Graphics Acceleration"
new "圖形加速"
# renpy/common/00gltest.rpy:54
old "Automatically Choose"
new "自動選擇"
# renpy/common/00gltest.rpy:59
old "Force Angle/DirectX Renderer"
new "強制 Angle/DirectX 渲染"
# renpy/common/00gltest.rpy:63
old "Force OpenGL Renderer"
new "強制 OpenGL 渲染"
# renpy/common/00gltest.rpy:67
old "Force Software Renderer"
new "強制軟體渲染"
# renpy/common/00gltest.rpy:73
old "Changes will take effect the next time this program is run."
new "更改將會在下次啟動程式時生效。"
# renpy/common/00gltest.rpy:77
old "Quit"
new "離開"
# renpy/common/00gltest.rpy:82
old "Return"
new "返回"
# renpy/common/00gltest.rpy:112
old "Performance Warning"
new "效能警告"
# renpy/common/00gltest.rpy:117
old "This computer is using software rendering."
new "該電腦正在使用軟體渲染。"
# renpy/common/00gltest.rpy:119
old "This computer is not using shaders."
new "該電腦沒有使用著色器"
# renpy/common/00gltest.rpy:121
old "This computer is displaying graphics slowly."
new "該電腦圖形顯示緩慢。"
# renpy/common/00gltest.rpy:123
old "This computer has a problem displaying graphics: [problem]."
new "該電腦圖形顯示出錯:[problem]。"
# renpy/common/00gltest.rpy:128
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display. Updating DirectX could fix this problem."
new "目前的圖形驅動程式版本可能過舊或者運作不正確。這樣會導致圖形顯示緩慢或者錯誤。升級 DirectX 可能會解決該問題。"
# renpy/common/00gltest.rpy:130
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display."
new "目前圖形驅動程式版本可能過舊或者運作不正確。這樣會導致圖形顯示緩慢或者錯誤。"
# renpy/common/00gltest.rpy:135
old "Update DirectX"
new "更新 DirectX"
# renpy/common/00gltest.rpy:141
old "Continue, Show this warning again"
new "繼續,下次再顯示該警告"
# renpy/common/00gltest.rpy:145
old "Continue, Don't show warning again"
new "繼續,不再顯示該警告"
# renpy/common/00gltest.rpy:171
old "Updating DirectX."
new "正在更新 DirectX。"
# renpy/common/00gltest.rpy:175
old "DirectX web setup has been started. It may start minimized in the taskbar. Please follow the prompts to install DirectX."
new "DirectX 線上安裝已啟動。將會最小化到狀態列中。請按照說明安裝 DirectX。"
# renpy/common/00gltest.rpy:179
old "{b}Note:{/b} Microsoft's DirectX web setup program will, by default, install the Bing toolbar. If you do not want this toolbar, uncheck the appropriate box."
new "{b}警告:{/b} Microsoft's DirectX 線上安裝程式會預設安裝 Bing 瀏覽器工具列。如果您不需要安裝這個工具列,請取消勾選對應選項。"
# renpy/common/00gltest.rpy:183
old "When setup finishes, please click below to restart this program."
new "當安裝完成後請點選下方來重新啟動應用程式。"
# renpy/common/00gltest.rpy:185
old "Restart"
new "重新啟動"
translate traditional_chinese strings:
# renpy/common/00keymap.rpy:167
old "Saved screenshot as %s."
new "儲存螢幕截圖為 %s。"
translate traditional_chinese strings:
# renpy/common/00layout.rpy:439
old "Are you sure?"
new "是否確認?"
# renpy/common/00layout.rpy:443
old "Are you sure you want to quit?"
new "您確定您要離開嗎?"
# renpy/common/00layout.rpy:444
old "Are you sure you want to return to the main menu?\nThis will lose unsaved progress."
new "您確定您想回到標題畫面嗎?\n這將使您失去所有未儲存的進度。"
# renpy/common/00layout.rpy:441
old "Are you sure you want to overwrite your save?"
new "您確定您要覆寫您的存檔?"
# renpy/common/00layout.rpy:442
old "Loading will lose unsaved progress.\nAre you sure you want to do this?"
new "載入將會失去所有未儲存的進度。\n您確定您要這麼做嗎?"
# renpy/common/00layout.rpy:440
old "Are you sure you want to delete this save?"
new "您確定您要刪掉這份存檔嗎?"
translate traditional_chinese strings:
# renpy/common/00library.rpy:77
old "Skip Mode"
new "跳過對話模式"
# renpy/common/00library.rpy:80
old "Fast Skip Mode"
new "快速跳過對話模式"
translate traditional_chinese strings:
# renpy/common/00updater.rpy:1258
old "Updater"
new "更新"
# renpy/common/00updater.rpy:1267
old "This program is up to date."
new "該程式已是最新版本。"
# renpy/common/00updater.rpy:1269
old "[u.version] is available. Do you want to install it?"
new "[u.version] 已釋出。是否確認安裝?"
# renpy/common/00updater.rpy:1271
old "Preparing to download the updates."
new "正在準備下載更新。"
# renpy/common/00updater.rpy:1273
old "Downloading the updates."
new "正在下載更新。"
# renpy/common/00updater.rpy:1275
old "Unpacking the updates."
new "解壓縮更新檔案。"
# renpy/common/00updater.rpy:1279
old "The updates have been installed. The program will restart."
new "該更新檔案已安裝,程式將會重新啟動。"
# renpy/common/00updater.rpy:1281
old "The updates have been installed."
new "已完成更新。"
# renpy/common/00updater.rpy:1283
old "The updates were cancelled."
new "已取消更新。"
translate traditional_chinese strings:
# renpy/common/_compat/gamemenu.rpym:180
old "Empty Slot."
new "空白欄位"
# renpy/common/_compat/gamemenu.rpym:337
old "Previous"
new "上一頁"
# renpy/common/_compat/gamemenu.rpym:344
old "Next"
new "下一頁"
translate traditional_chinese strings:
# renpy/common/_compat/preferences.rpym:411
old "Joystick Mapping"
new "遊戲桿映射"
translate traditional_chinese strings:
# renpy/common/_errorhandling.rpym:408
old "An exception has occurred."
new "發生一個異常狀況。"
# renpy/common/_errorhandling.rpym:434
old "Rollback"
new "回滾"
# renpy/common/_errorhandling.rpym:436
old "Attempts a roll back to a prior time, allowing you to save or choose a different choice."
new "嘗試回滾到先前的狀態,使您可以存檔或者選擇不同選項。"
# renpy/common/_errorhandling.rpym:439
old "Ignore"
new "忽略"
# renpy/common/_errorhandling.rpym:441
old "Ignores the exception, allowing you to continue. This often leads to additional errors."
new "忽略異常,讓您可以繼續。這通常會產生額外的錯誤。"
# renpy/common/_errorhandling.rpym:444
old "Reload"
new "重新載入"
# renpy/common/_errorhandling.rpym:446
old "Reloads the game from disk, saving and restoring game state if possible."
new "從硬碟重新載入遊戲,請您儲存遊戲狀態。"
# renpy/common/_errorhandling.rpym:448
old "Open Traceback"
new "開啟回溯"
# renpy/common/_errorhandling.rpym:450
old "Opens the traceback.txt file in a text editor."
new "在編輯器中開啟回溯檔案(traceback.txt)。"
# renpy/common/_errorhandling.rpym:456
old "Quits the game."
new "離開遊戲。"
# renpy/common/_errorhandling.rpym:483
old "Parsing the script failed."
new "解析腳本失敗。"
# renpy/common/_errorhandling.rpym:510
old "Open Parse Errors"
new "開啟解析錯誤"
# renpy/common/_errorhandling.rpym:512
old "Opens the errors.txt file in a text editor."
new "在編輯器中開啟解析錯誤檔案(errors.txt)。"
translate traditional_chinese strings:
# renpy/common/_layout/classic_load_save.rpym:152
old "a"
new "a"
# renpy/common/_layout/classic_load_save.rpym:161
old "q"
new "q"
translate traditional_chinese strings:
# renpy/common/00action_file.rpy:587
old "Quick save complete."
new "快速儲存。"
translate traditional_chinese strings:
# renpy/common/00gallery.rpy:521
old "Image [index] of [count] locked."
new "[count]個圖片中的第[index]個圖片被鎖定。"
# renpy/common/00gallery.rpy:539
old "prev"
new "上一頁"
# renpy/common/00gallery.rpy:540
old "next"
new "下一頁"
# renpy/common/00gallery.rpy:541
old "slideshow"
new "幻燈片"
# renpy/common/00gallery.rpy:542
old "return"
new "返回"
translate traditional_chinese strings:
# renpy/common/00layout.rpy:427
old "Are you sure you want to begin skipping?"
new "是否確定開始略過?"
# renpy/common/00layout.rpy:428
old "Are you sure you want to skip to the next choice?"
new "是否確定跳到下一個選項?"
# renpy/common/00layout.rpy:429
old "Are you sure you want to skip to unseen dialogue or the next choice?"
new "是否確定略過未看過的訊息或下一選項?"
translate traditional_chinese strings:
# renpy/common/00console.rpy:179
old "%(version)s console, originally by Shiz, C, and delta.\n"
new "%(version)s 控制臺,作者: Shiz, C, delta。"
# renpy/common/00console.rpy:180
old "Press <esc> to exit console. Type help for help.\n"
new "按 <esc> 來退出控制臺。輸入 help 來檢視說明。\n"
# renpy/common/00console.rpy:184
old "Ren'Py script enabled."
new "使用 Ren'Py 腳本。"
# renpy/common/00console.rpy:186
old "Ren'Py script disabled."
new "禁用 Ren'Py 腳本。"
# renpy/common/00console.rpy:392
old "help: show this help"
new "help: 顯示說明資訊"
# renpy/common/00console.rpy:397
old "commands:\n"
new "命令列:\n"
# renpy/common/00console.rpy:407
old " <renpy script statement>: run the statement\n"
new " <renpy script statement>:運行語句\n"
# renpy/common/00console.rpy:409
old " <python expression or statement>: run the expression or statement"
new " <python expression or statement>:運行運算式或語句"
# renpy/common/00console.rpy:417
old "clear: clear the console history"
new "clear: 清除控制臺歷史記錄"
# renpy/common/00console.rpy:421
old "exit: exit the console"
new "exit: 離開控制臺"
# renpy/common/00console.rpy:429
old "load <slot>: loads the game from slot"
new "load <slot>:載入遊戲存檔(以 slot 為存檔號)"
# renpy/common/00console.rpy:442
old "save <slot>: saves the game in slot"
new "save <slot>:儲存遊戲存檔(以 slot 為存檔號)"
# renpy/common/00console.rpy:453
old "reload: reloads the game, refreshing the scripts"
new "reload: 重新載入遊戲,並重新整理腳本"
# renpy/common/00console.rpy:461
old "watch <expression>: watch a python expression"
new "watch <expression>: 監視一個 python 運算式"
# renpy/common/00console.rpy:470
old "unwatch <expression>: stop watching an expression"
new "unwatch <expression>:停止監視某個運算式"
# renpy/common/00console.rpy:478
old "unwatchall: stop watching all expressions"
new "unwatchall:停止監視索引運算式"
# renpy/common/00console.rpy:484
old "jump <label>: jumps to label"
new "jump <label>: 跳移至標籤"
translate traditional_chinese strings:
# renpy/common/_developer/developer.rpym:65
old "Developer Menu"
new "開發者選單"
# renpy/common/_developer/developer.rpym:67
old "Reload Game (Shift+R)"
new "重新載入遊戲(Shift+R"
# renpy/common/_developer/developer.rpym:69
old "Console (Shift+O)"
new "控制臺(Shift+O)"
# renpy/common/_developer/developer.rpym:71
old "Variable Viewer"
new "變數觀察器"
# renpy/common/_developer/developer.rpym:73
old "Theme Test"
new "介面主題測試"
# renpy/common/_developer/developer.rpym:75
old "Image Location Picker"
new "圖片座標撿選器"
# renpy/common/_developer/developer.rpym:77
old "Filename List"
new "檔案清單"
# renpy/common/_developer/developer.rpym:81
old "Show Image Load Log"
new "顯示圖片載入記錄"
# renpy/common/_developer/developer.rpym:84
old "Hide Image Load Log"
new "隱藏圖片載入記錄"
# renpy/common/_developer/developer.rpym:149
old "No variables have changed since the game started."
new "遊戲開始至此沒有任何變數被改變。"
# renpy/common/_developer/developer.rpym:152
old "Return to the developer menu"
new "回到開發者選單"
# renpy/c72
old "{b}Missing Images{/b}"
new "{b}丟失圖片{/b}"
# renpy/common/_developer/developer.rpym:424
old "Rectangle: %r"
new "矩形區域:%r"
# renpy/common/_developer/developer.rpym:429
old "Mouse position: %r"
new "滑鼠位置:%r"
# renpy/common/_developer/developer.rpym:431
old "Right-click or escape to quit."
new "點選滑鼠右鍵或者按 ESC 鍵來退出。"
# renpy/common/_developer/developer.rpym:482
old "Done"
new "完成"
translate traditional_chinese strings:
# renpy/common/_developer/inspector.rpym:43
old "Displayable Inspector"
new "Displayable 檢閱器"
# renpy/common/_developer/inspector.rpym:49
old "Nothing to inspect."
new "沒有東西被檢閱"
# renpy/common/_developer/inspector.rpym:58
old "Size"
new "大小"
# renpy/common/_developer/inspector.rpym:63
old "Style"
new "風格"
# renpy/common/_developer/inspector.rpym:123
old "Inspecting Styles of [displayable_name!q]"
new "檢閱[displayable_name!q]的風格"
# renpy/common/_developer/inspector.rpym:135
old "displayable:"
new "displayable"
# renpy/common/_developer/inspector.rpym:142
old " (no properties affect the displayable)"
new " (沒有偏好的可顯示屬性)"
# renpy/common/_developer/inspector.rpym:144
old " (default properties omitted)"
new " (忽略預設屬性)"
# renpy/common/_developer/inspector.rpym:174
old "<repr() failed>"
new "<repr() failed>"
# Translation updated at 2014-10-18 06:00
translate traditional_chinese strings:
# renpy/common/_developer/inspector.rpym:80
old "Location"
new "位置"
# renpy/common/00preferences.rpy:373
old "Self-voicing enabled. Press 'v' to disable."
new "Self-voicing 啟用。可按下 'v' 來禁用。"
@@ -0,0 +1,49 @@
translate traditional_chinese strings:
# game/distribute.rpy:333
old "Nothing to do."
new "什麼都不做。"
# game/distribute.rpy:337
old "Scanning project files..."
new "掃描專案檔案..."
# game/distribute.rpy:344
old "Scanning Ren'Py files..."
new "掃描 Ren'Py 檔案..."
# game/distribute.rpy:494
old "Archiving files..."
new "壓縮檔案..."
# game/distribute.rpy:745
old "Writing the [variant] [format] package."
new "寫入 [variant] [format] 套件。"
# game/distribute.rpy:758
old "Making the [variant] update zsync file."
new "新增 [variant] 更新 zsync 檔案。"
# game/distribute.rpy:854
old "Processed {b}[complete]{/b} of {b}[total]{/b} files."
new "完成處理 {b}[complete]{/b} ,共 {b}[total]{/b}個檔案。"
# game/distribute.rpy:915
old "All packages have been built.\n\nDue to the presence of permission information, unpacking and repacking the Linux and Macintosh distributions on Windows is not supported."
new "所有套件已被建立。\n\n由於含有授權資訊存在,因此在 Windows 中不支援解開和重新包裝 Linux 及 Mac 的套件。"
translate traditional_chinese strings:
# game/distribute.rpy:358
old "No packages are selected, so there's nothing to do."
new "沒有選擇套件,沒有可以處理的事情。"
translate traditional_chinese strings:
# game/distribute.rpy:335
old "Building distributions failed:\n\nThe build.directory_name variable may not include the space, colon, or semicolon characters."
new "建立釋出版失敗:\n\n build.directory_name 變數可能包含空格,冒號或分號。"
@@ -0,0 +1,47 @@
translate traditional_chinese strings:
# game/distribute_gui.rpy:139
old "Build Distributions: [project.current.name!q]"
new "建立釋出版:[project.current.name!q]"
# game/distribute_gui.rpy:154
old "Directory Name:"
new "目錄名稱:"
# game/distribute_gui.rpy:158
old "Executable Name:"
new "執行檔案名稱:"
# game/distribute_gui.rpy:167
old "Actions:"
new "動作:"
# game/distribute_gui.rpy:175
old "Edit options.rpy"
new "編輯 options.rpy"
# game/distribute_gui.rpy:176
old "Refresh"
new "重新整理"
# game/distribute_gui.rpy:193
old "Build Packages:"
new "建立套件:"
# game/distribute_gui.rpy:208
old "Build Updates"
new "建立更新檔"
# game/distribute_gui.rpy:212
old "Build"
new "建立"
# game/distribute_gui.rpy:219
old "Errors were detected when running the project. Please ensure the project runs without errors before building distributions."
new "當運行專案時發生了錯誤。在開始釋出前請確保專案運行無誤。"
# game/distribute_gui.rpy:236
old "Your project does not contain build information. Would you like to add build information to the end of options.rpy?"
new "您的專案不包含建置資訊。是否加入建置資訊到 options.rpy"
@@ -0,0 +1,66 @@
translate traditional_chinese strings:
# game/editor.rpy:120
old "{b}Recommended.{/b} A beta editor with an easy to use interface and features that aid in development, such as spell-checking. Editra currently lacks the IME support required for Chinese, Japanese, and Korean text input."
new "{b}推薦{/b} 一個有簡單易用介面和功能的測試版編輯器能夠幫助開發,例如拼字的校對功能。Editra 目前缺乏中文、日文,韓文的輸入的 IME 支援。"
# game/editor.rpy:121
old "{b}Recommended.{/b} A beta editor with an easy to use interface and features that aid in development, such as spell-checking. Editra currently lacks the IME support required for Chinese, Japanese, and Korean text input. On Linux, Editra requires wxPython."
new "{b}推薦{/b} 一個有簡單易用的介面和功能的測試版編輯器能夠幫助開發,例如拼字的校對功能。Editra 現在沒有中文,日文,韓文的輸入功能。在 linux 中 Editra 需要 wxPython(模組支援)。"
# game/editor.rpy:137
old "The may have occured because wxPython is not installed on this system."
new "這可能是由於 wxPython 未安裝在此系統中而出現的。"
# game/editor.rpy:144
old "Up to 22 MB download required."
new "22 MB 需要下載。"
# game/editor.rpy:157
old "1.8 MB download required."
new "1.8 MB 需要下載。"
# game/editor.rpy:158
old "This may have occured because Java is not installed on this system."
new "這可能是由於 Java 未安裝在此系統中而出現的。"
# game/editor.rpy:327
old "An exception occured while launching the text editor:\n[exception!q]"
new "啟動以下編輯器出現異常:\n[exception!q]"
# game/editor.rpy:378
old "Select Editor"
new "選擇編輯器"
# game/editor.rpy:393
old "A text editor is the program you'll use to edit Ren'Py script files. Here, you can select the editor Ren'Py will use. If not already present, the editor will be automatically downloaded and installed."
new "文字編輯器是您用於編輯 Ren'py 腳本的程式。在這裡您可以選擇 Ren'py 會使用到編輯器。如果選定則編輯器將會自動下載並安裝。"
# game/editor.rpy:415
old "Cancel"
new "取消"
translate traditional_chinese strings:
# game/editor.rpy:155
old "A mature editor that requires Java."
new "一個成熟的編輯器,它需要 Java。"
# game/editor.rpy:164
old "Invokes the editor your operating system has associated with .rpy files."
new "調用作業系統已與 .rpy 檔案關聯的編輯器。"
# game/editor.rpy:180
old "Prevents Ren'Py from opening a text editor."
new "防止 Ren'Py 開啟文字編輯器。"
# Translation updated at 2014-10-18 06:00
translate traditional_chinese strings:
# game/editor.rpy:167
old "This may have occured because wxPython is not installed on this system."
new "這可能是因為 wxPython 沒有被安裝在當前系統中而發生的。"
@@ -0,0 +1,113 @@
translate traditional_chinese strings:
# game/front_page.rpy:79
old "+ Create New Project"
new "+ 新增專案"
# game/front_page.rpy:90
old "Launch Project"
new "啟動專案"
# game/front_page.rpy:111
old "Tutorial"
new "教程"
# game/front_page.rpy:112
old "The Question"
new "問題"
# game/front_page.rpy:128
old "Active Project"
new "活動專案"
# game/front_page.rpy:136
old "Open Directory"
new "開啟目錄"
# game/front_page.rpy:141
old "game"
new "game"
# game/front_page.rpy:142
old "base"
new "base"
# game/front_page.rpy:148
old "Edit File"
new "編輯檔案"
# game/front_page.rpy:156
old "All script files"
new "開啟所有檔案"
# game/front_page.rpy:165
old "Navigate Script"
new "腳本導航"
# game/front_page.rpy:176
old "Check Script (Lint)"
new "檢查腳本(Lint"
# game/front_page.rpy:177
old "Change Theme"
new "變更介面主題"
# game/front_page.rpy:178
old "Delete Persistent"
new "刪除永久性資料"
# game/front_page.rpy:186
old "Build Distributions"
new "建立釋出版"
# game/front_page.rpy:188
old "Generate Translations"
new "產生翻譯"
# game/front_page.rpy:204
old "Checking script for potential problems..."
new "檢查腳本中的潛在錯誤..."
# game/front_page.rpy:219
old "Deleting persistent data..."
new "刪除永久性資料..."
translate traditional_chinese strings:
# game/front_page.rpy:69
old "PROJECTS:"
new "專案列表:"
# game/front_page.rpy:122
old "[p.name!q] (template)"
new "[p.name!q] (template)"
# game/front_page.rpy:215
old "Android"
new "Android"
# game/front_page.rpy:217
old "Extract Dialogue"
new "產生對話框"
# Translation updated at 2014-10-18 06:00
translate traditional_chinese strings:
# game/front_page.rpy:35
old "Open [text] directory."
new "開啟 [text] 目錄。"
# game/front_page.rpy:150
old "Select project [text]."
new "選擇專案 [text]。"
# game/front_page.rpy:234
old "Force Recompile"
new "強制重編譯"
# game/front_page.rpy:285
old "Recompiling all rpy files into rpyc files..."
new "重編譯所有 rpy 檔案為 rpyc 檔案……"
@@ -0,0 +1,90 @@
translate traditional_chinese strings:
# game/interface.rpy:89
old "Documentation"
new "文件"
# game/interface.rpy:90
old "Ren'Py Website"
new "Ren'Py網站"
# game/interface.rpy:91
old "Ren'Py Games List"
new "Ren'Py遊戲列表"
# game/interface.rpy:92
old "About"
new "關於"
# game/interface.rpy:99
old "update"
new "更新"
# game/interface.rpy:101
old "preferences"
new "設定"
# game/interface.rpy:102
old "quit"
new "離開"
# game/interface.rpy:149
old "Yes"
new "確定"
# game/interface.rpy:151
old "No"
new "取消"
# game/interface.rpy:181
old "Due to package format limitations, non-ASCII file and directory names are not allowed."
new "由於套件格式的限制,非 ASCII 編碼的檔案和目錄將不被支援。"
# game/interface.rpy:183
old "[title]"
new "[title]"
# game/interface.rpy:248
old "ERROR"
new "錯誤"
# game/interface.rpy:280
old "While [what!q], an error occured:"
new "[what!q]時,出現錯誤:"
# game/interface.rpy:281
old "[exception!q]"
new "[exception!q]"
# game/interface.rpy:298
old "Text input may not contain the {{ or [[ characters."
new "文字輸入可能不包含{{ 或 [[ 字元。"
# game/interface.rpy:303
old "File and directory names may not contain / or \\."
new "檔案或目錄不包含/或\\。"
# game/interface.rpy:309
old "File and directory names must consist of ASCII characters."
new "檔案名稱和目錄名稱必須是 ASCII 字元。"
# game/interface.rpy:330
old "INFORMATION"
new "資訊"
# game/interface.rpy:373
old "PROCESSING"
new "正在處理"
# game/interface.rpy:390
old "QUESTION"
new "問題"
translate traditional_chinese strings:
# game/interface.rpy:456
old "CHOICE"
new "選擇"
@@ -0,0 +1,71 @@
translate traditional_chinese strings:
# game/navigation.rpy:150
old "Navigate: [project.current.name]"
new "導航:[project.current.name]"
# game/navigation.rpy:159
old "Order: "
new "排序:"
# game/navigation.rpy:160
old "alphabetical"
new "按字母順序"
# game/navigation.rpy:162
old "by-file"
new "按檔案"
# game/navigation.rpy:164
old "natural"
new "natural"
# game/navigation.rpy:168
old "refresh"
new "重新整理"
# game/navigation.rpy:176
old "Category:"
new "類別:"
# game/navigation.rpy:178
old "files"
new "檔案"
# game/navigation.rpy:179
old "labels"
new "標籤"
# game/navigation.rpy:180
old "defines"
new "定義"
# game/navigation.rpy:181
old "transforms"
new "轉換"
# game/navigation.rpy:182
old "screens"
new "螢幕"
# game/navigation.rpy:183
old "callables"
new "可呼叫"
# game/navigation.rpy:184
old "TODOs"
new "待辦事項"
# game/navigation.rpy:223
old "+ Add script file"
new "+ 加入腳本檔案"
# game/navigation.rpy:231
old "No TODO comments found.\n\nTo create one, include \"# TODO\" in your script."
new "沒有待辦的事項被發現。\n\n要建立一個包含\"# TODO\"到您的腳本中。"
# game/navigation.rpy:238
old "The list of names is empty."
new "名稱清單為空。"
@@ -0,0 +1,45 @@
translate traditional_chinese strings:
# game/new_project.rpy:22
old "Choose Project Template"
new "選擇專案模版"
# game/new_project.rpy:40
old "Please select a template to use for your new project. Ren'Py ships with a default template that creates an English-language game with standard screens."
new "請選擇一個用於新專案的模版。Ren'Py 中預設了一個標準視窗的英文遊戲。"
# game/new_project.rpy:55
old "PROJECT NAME"
new "專案名稱"
# game/new_project.rpy:56
old "Please enter the name of your project:"
new "請輸入專案名稱:"
# game/new_project.rpy:62
old "The project name may not be empty."
new "專案名稱不能為空。"
# game/new_project.rpy:67
old "[project_name!q] already exists. Please choose a different project name."
new "[project_name!q]已存在。請選擇不同的名稱。"
# game/new_project.rpy:70
old "[project_dir!q] already exists. Please choose a different project name."
new "[project_dir!q] 已存在。請選擇不同的名稱。"
translate traditional_chinese strings:
# game/new_project.rpy:40
old "Please select a template to use for your new project. The template sets the default font and the user interface language. If your language is not supported, choose 'english'."
new "請為您新增的專案選擇一個模版。該模版將設定為預設的字型和語言。如果您的所使用的語言沒有被支援,那麼請選擇「english」。"
translate traditional_chinese strings:
# game/new_project.rpy:71
old "The projects directory could not be set. Giving up."
new "無法設定專案目錄。放棄。"
@@ -0,0 +1,82 @@
translate traditional_chinese strings:
# game/preferences.rpy:40
old "Launcher Preferences"
new "啟動器偏好"
# game/preferences.rpy:61
old "Projects Directory:"
new "專案目錄:"
# game/preferences.rpy:68
old "[persistent.projects_directory!q]"
new "[persistent.projects_directory!q]"
# game/preferences.rpy:70
old "Not Set"
new "未設定"
# game/preferences.rpy:84
old "Text Editor:"
new "文字編輯器: "
# game/preferences.rpy:106
old "Update Channel:"
new "更新頻道:"
# game/preferences.rpy:126
old "Navigation Options:"
new "導航選項:"
# game/preferences.rpy:130
old "Include private names"
new "包含私有名稱"
# game/preferences.rpy:131
old "Include library names"
new "包含資料庫名稱"
# game/preferences.rpy:141
old "Launcher Options:"
new "啟動器選項:"
# game/preferences.rpy:145
old "Hardware rendering"
new "硬體渲染"
# game/preferences.rpy:148
old "Console output"
new "控制臺輸出"
# game/preferences.rpy:169
old "Open launcher project"
new "開啟啟動器專案"
# game/preferences.rpy:183
old "Language:"
new "語言:"
translate traditional_chinese strings:
# game/preferences.rpy:146
old "Show templates"
new "顯示模版"
# game/preferences.rpy:165
old "Large fonts"
new "大字體"
# Translation updated at 2014-10-18 06:00
translate traditional_chinese strings:
# game/preferences.rpy:91
old "Projects directory: [text]"
new "專案資料夾: [text]"
# game/preferences.rpy:114
old "Text editor: [text]"
new "文字編輯器: [text]"
@@ -0,0 +1,66 @@
translate traditional_chinese strings:
# game/project.rpy:196
old "Ren'Py is scanning the project..."
new "Ren'Py 正在掃描專案..."
# game/project.rpy:485
old "PROJECTS DIRECTORY"
new "專案目錄"
# game/project.rpy:485
old "Please choose the projects directory using the directory chooser.\n{b}The directory chooser may have opened behind this window.{/b}"
new "請使用目錄選擇器選擇專案目錄。\n{b}目錄選擇視窗可能會開啟在本視窗後面。{/b}"
# game/project.rpy:485
old "This launcher will scan for projects in this directory, will create new projects in this directory, and will place built projects into this directory."
new "啟動器會掃描該目錄下的專案,新增的專案也將在該目錄下建置。專案也在該目錄下建立。"
# game/project.rpy:525
old "Ren'Py was unable to run python with tkinter to choose the projects directory."
new "Ren'Py 無法運行 python 的 tkinter 來選擇專案目錄。"
# game/project.rpy:529
old "Ren'Py has set the projects directory to:"
new "Ren'Py 已將專案目錄設定為:"
translate traditional_chinese strings:
# game/project.rpy:48
old "After making changes to the script, press shift+R to reload your game."
new "改變腳本後,請按 shift+R 來重新載入您的遊戲。"
# game/project.rpy:49
old "Press shift+O (the letter) to access the console."
new "按 shift+O (the letter)來進入控制臺。"
# game/project.rpy:50
old "Press shift+D to access the developer menu."
new "按 shift+D 來進入開發者選單"
# game/project.rpy:219
old "Launching the project failed."
new "啟動專案失敗。"
# game/project.rpy:219
old "Please ensure that your project launches normally before running this command."
new "請確保您的專案能正常啟動再執行本指令。"
# game/project.rpy:516
old "Launching"
new "正在啟動"
# game/project.rpy:585
old "Ren'Py was unable to run python with tkinter to choose the projects directory. Please install the python-tk or tkinter package."
new "Ren'Py 無法運行 python 的 tkinter 來選擇專案目錄。請安裝 python-tk 或 tkinter。"
# Translation updated at 2014-10-18 06:00
translate traditional_chinese strings:
# game/project.rpy:47
old "Have you backed up your projects recently?"
new "您最近有備份您的專案嗎?"
@@ -0,0 +1,35 @@
translate traditional_chinese python:
DROID = "tl/traditional_chinese/DroidSansFallback.ttf"
translate traditional_chinese style l_default:
font DROID
size 16
translate traditional_chinese style l_button_text:
selected_font DROID
selected_bold True
translate traditional_chinese style l_link_text:
font DROID
translate traditional_chinese style l_alternate_text:
font DROID
translate traditional_chinese style l_navigation_button_text:
font DROID
translate traditional_chinese style l_navigation_text:
font DROID
bold True
translate traditional_chinese style l_checkbox_text:
selected_font DROID
translate traditional_chinese style l_nonbox_text:
selected_font DROID
translate traditional_chinese style hyperlink_text:
font DROID
translate traditional_chinese python:
make_style_backup()
@@ -0,0 +1,38 @@
translate traditional_chinese strings:
# game/translations.rpy:10
old "Create or Update Translations"
new "新增或更新翻譯"
# game/translations.rpy:10
old "Please enter the name of the language for which you want to create or update translations."
new "請輸入您要新增或者更新語言的名稱。"
# game/translations.rpy:15
old "The language name can not be the empty string."
new "語言名稱不能為空字串。"
# game/translations.rpy:26
old "Ren'Py is generating translations...."
new "Ren'Py 正在產生翻譯..."
# game/translations.rpy:30
old "Ren'Py has finished generating [language] translations."
new "Ren'Py 已經完成[language]翻譯檔案。"
translate traditional_chinese strings:
# game/translations.rpy:44
old "What format would you like for the extracted dialogue?"
new "您要使用什麼格式來提取對話框?"
# game/translations.rpy:56
old "Ren'Py is extracting dialogue...."
new "Ren'Py 正在提取對話框..."
# game/translations.rpy:60
old "Ren'Py has finished extracting dialogue. The extracted dialogue can be found in dialogue.[format] in the base directory."
new "Ren'Py 已經完成對話框提取。提取的對話可以在底層目錄下 dialogue.[format] 中找到。"
@@ -0,0 +1,98 @@
translate traditional_chinese strings:
# game/updater.rpy:54
old "Select Update Channel"
new "選擇更新頻道"
# game/updater.rpy:65
old "The update channel controls the version of Ren'Py the updater will download. Please select an update channel:"
new "更新頻道控制 Ren'Py 更新將會下載的版本。請選擇一個更新頻道。"
# game/updater.rpy:70
old "Release"
new "Release"
# game/updater.rpy:76
old "{b}Recommended.{/b} The version of Ren'Py that should be used in all newly-released games."
new "{b}推薦{/b} Ren'py 的版本應在所有新釋出的遊戲中使用。"
# game/updater.rpy:81
old "Prerelease"
new "Prerelease"
# game/updater.rpy:87
old "A preview of the next version of Ren'Py that can be used for testing and taking advantage of new features, but not for final releases of games."
new "預覽 Ren'py 的下一個版本,適合用於測試和體驗新功能,但不適合遊戲的最終版本。"
# game/updater.rpy:93
old "Experimental"
new "Experimental"
# game/updater.rpy:99
old "Experimental versions of Ren'Py. You shouldn't select this channel unless asked by a Ren'Py developer."
new "Ren'py 的實驗版本,除非您被 Ren'py 的開發者要求,否則您不應該選擇此頻道。"
# game/updater.rpy:119
old "An error has occured:"
new "一個錯誤發生:"
# game/updater.rpy:121
old "Checking for updates."
new "檢查更新"
# game/updater.rpy:123
old "Ren'Py is up to date."
new "Ren'Py 已是最新版本"
# game/updater.rpy:125
old "[u.version] is now available. Do you want to install it?"
new "[u.version] 已經可以更新。你要下載它嗎?"
# game/updater.rpy:127
old "Preparing to download the update."
new "準備下載更新。"
# game/updater.rpy:129
old "Downloading the update."
new "正在下載更新。"
# game/updater.rpy:131
old "Unpacking the update."
new "正在解壓縮更新檔案。"
# game/updater.rpy:133
old "Finishing up."
new "即將完成。"
# game/updater.rpy:135
old "The update has been installed. Ren'Py will restart."
new "已安裝更新。Ren'Py 將會重新啟動。"
# game/updater.rpy:137
old "The update has been installed."
new "已安裝更新。"
# game/updater.rpy:139
old "The update was cancelled."
new "已取消更新。"
# game/updater.rpy:156
old "Ren'Py Update"
new "Ren'Py 更新"
# game/updater.rpy:162
old "Proceed"
new "繼續"
translate traditional_chinese strings:
# game/updater.rpy:129
old "Nightly"
new "Nightly"
# game/updater.rpy:135
old "The bleeding edge of Ren'Py development. This may have the latest features, or might not run at all."
new "Ren'Py 最新的開發版本。這可能會擁有最新的功能,或可能根本無法運作。"
+31 -34
View File
@@ -25,8 +25,7 @@
* 11/08/2004 - Compr fix, levels -1,1-7 now work - Tyler Montbriand
*/
#include <stdlib.h>
#include <SDL/SDL.h>
#include <SDL/SDL_byteorder.h>
#include <SDL.h>
#include <png.h>
#include <zlib.h>
#include "IMG_savepng.h"
@@ -38,7 +37,7 @@
int IMG_SavePNG(const char *file, SDL_Surface *surf,int compression){
SDL_RWops *fp;
int ret;
fp=SDL_RWFromFile(file,"wb");
if( fp == NULL ) {
@@ -60,24 +59,25 @@ int IMG_SavePNG_RW(SDL_RWops *src, SDL_Surface *surf,int compression){
png_infop info_ptr;
SDL_PixelFormat *fmt=NULL;
SDL_Surface *tempsurf=NULL;
int ret,funky_format,used_alpha;
unsigned int i,temp_alpha;
int ret,funky_format;
unsigned int i;
png_colorp palette;
Uint8 *palette_alpha=NULL;
png_byte **row_pointers=NULL;
png_ptr=NULL;info_ptr=NULL;palette=NULL;ret=-1;
funky_format=0;
SDL_BlendMode temp_blend;
if( !src || !surf) {
goto savedone; /* Nothing to do. */
}
row_pointers=(png_byte **)malloc(surf->h * sizeof(png_byte*));
if (!row_pointers) {
if (!row_pointers) {
SDL_SetError("Couldn't allocate memory for rowpointers");
goto savedone;
}
png_ptr=png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL,NULL,NULL);
if (!png_ptr){
SDL_SetError("Couldn't allocate memory for PNG file");
@@ -126,19 +126,19 @@ int IMG_SavePNG_RW(SDL_RWops *src, SDL_Surface *surf,int compression){
palette[i].blue=fmt->palette->colors[i].b;
}
png_set_PLTE(png_ptr,info_ptr,palette,fmt->palette->ncolors);
if (surf->flags&SDL_SRCCOLORKEY) {
palette_alpha=(Uint8 *)malloc((fmt->colorkey+1)*sizeof(Uint8));
if (!palette_alpha) {
SDL_SetError("Couldn't create memory for palette transparency");
goto savedone;
}
/* FIXME: memset? */
for (i=0;i<(fmt->colorkey+1);i++) {
palette_alpha[i]=255;
}
palette_alpha[fmt->colorkey]=0;
png_set_tRNS(png_ptr,info_ptr,palette_alpha,fmt->colorkey+1,NULL);
}
// if (surf->flags&SDL_SRCCOLORKEY) {
// palette_alpha=(Uint8 *)malloc((fmt->colorkey+1)*sizeof(Uint8));
// if (!palette_alpha) {
// SDL_SetError("Couldn't create memory for palette transparency");
// goto savedone;
// }
// /* FIXME: memset? */
// for (i=0;i<(fmt->colorkey+1);i++) {
// palette_alpha[i]=255;
// }
// palette_alpha[fmt->colorkey]=0;
// png_set_tRNS(png_ptr,info_ptr,palette_alpha,fmt->colorkey+1,NULL);
// }
}else{ /* Truecolor */
if (fmt->Amask) {
png_set_IHDR(png_ptr,info_ptr,
@@ -172,11 +172,11 @@ int IMG_SavePNG_RW(SDL_RWops *src, SDL_Surface *surf,int compression){
}else{
/* Check for RGB/BGR/GBR/RBG/etc surfaces.*/
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
if(fmt->Rmask!=0xFF0000
if(fmt->Rmask!=0xFF0000
|| fmt->Gmask!=0x00FF00
|| fmt->Bmask!=0x0000FF){
#else
if(fmt->Rmask!=0x0000FF
if(fmt->Rmask!=0x0000FF
|| fmt->Gmask!=0x00FF00
|| fmt->Bmask!=0xFF0000){
#endif
@@ -185,7 +185,7 @@ int IMG_SavePNG_RW(SDL_RWops *src, SDL_Surface *surf,int compression){
}
}else if (fmt->BytesPerPixel==4){
if (!fmt->Amask) { /* check for 32bit but no alpha */
funky_format=1;
funky_format=1;
}else{
/* Check for ARGB/ABGR/GBAR/RABG/etc surfaces.*/
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
@@ -228,21 +228,18 @@ int IMG_SavePNG_RW(SDL_RWops *src, SDL_Surface *surf,int compression){
SDL_SetError("Couldn't allocate temp surface");
goto savedone;
}
if(surf->flags&SDL_SRCALPHA){
temp_alpha=fmt->alpha;
used_alpha=1;
SDL_SetAlpha(surf,0,255); /* Set for an opaque blit */
}else{
used_alpha=0;
}
SDL_GetSurfaceBlendMode(surf, &temp_blend);
SDL_SetSurfaceBlendMode(surf, SDL_BLENDMODE_NONE);
if(SDL_BlitSurface(surf,NULL,tempsurf,NULL)!=0){
SDL_SetError("Couldn't blit surface to temp surface");
SDL_FreeSurface(tempsurf);
goto savedone;
}
if (used_alpha) {
SDL_SetAlpha(surf,SDL_SRCALPHA,(Uint8)temp_alpha); /* Restore alpha settings*/
}
SDL_SetSurfaceBlendMode(surf, temp_blend);
for(i=0;i<tempsurf->h;i++){
row_pointers[i]= ((png_byte*)tempsurf->pixels) + i*tempsurf->pitch;
}
+5 -9
View File
@@ -23,17 +23,13 @@
def version():
return (6, 12, 0)
cdef extern from "pygame/pygame.h":
cdef struct SDL_RWops:
pass
void import_pygame_rwobject()
SDL_RWops* RWopsFromPython(object obj)
from sdl2 cimport *
from pygame_sdl2 cimport *
cdef extern from "renpy.h":
void core_init()
void subpixel_init()
void save_png_core(object, SDL_RWops *, int)
@@ -425,6 +421,6 @@ def subpixel(pysrc, pydst, xoffset, yoffset, shift):
# Be sure to update scale.py when adding something new here!
import_pygame_rwobject()
import_pygame_sdl2__rwobject()
core_init()
subpixel_init()
+172 -172
View File
File diff suppressed because it is too large Load Diff
+6 -3
View File
@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <pygame/pygame.h>
#include <math.h>
#include <limits.h>
#include <libavutil/avstring.h>
@@ -35,6 +34,8 @@
#include <SDL.h>
#include <SDL_thread.h>
#include <pygame_sdl2/pygame_sdl2.surface_api.h>
#ifdef __MINGW32__
#undef main /* We don't want SDL to override our main() */
#endif
@@ -1296,7 +1297,7 @@ static int stream_component_open(VideoState *is, int stream_index)
is->video_current_pts_time = av_gettime();
packet_queue_init(&is->videoq);
is->video_tid = SDL_CreateThread(video_thread, is);
is->video_tid = SDL_CreateThread(video_thread, "video_thread", is);
break;
default:
break;
@@ -1606,7 +1607,7 @@ VideoState *ffpy_stream_open(SDL_RWops *rwops, const char *filename)
is->quit_mutex = SDL_CreateMutex();
is->quit_cond = SDL_CreateCond();
is->parse_tid = SDL_CreateThread(decode_thread, is);
is->parse_tid = SDL_CreateThread(decode_thread, "decode_thread", is);
is->first_frame = 1;
@@ -1665,6 +1666,8 @@ void ffpy_init(int rate, int status) {
ffpy_did_init = 1;
import_pygame_sdl2__surface();
show_status = status;
audio_sample_rate = rate;
+10
View File
@@ -0,0 +1,10 @@
from sdl2 cimport SDL_Surface, SDL_RWops
cdef extern from "pygame_sdl2/pygame_sdl2.rwobject_api.h":
void import_pygame_sdl2__rwobject()
SDL_RWops* RWopsFromPython(object obj)
cdef extern from "pygame_sdl2/pygame_sdl2.surface_api.h":
int import_pygame_sdl2__surface()
SDL_Surface *PySurface_AsSurface(object)
File diff suppressed because it is too large Load Diff
+108 -108
View File
@@ -23,8 +23,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "pss.h"
#include <Python.h>
#include <SDL/SDL.h>
#include <SDL/SDL_thread.h>
#include <SDL.h>
#include <SDL_thread.h>
#include <stdio.h>
/* Declarations of ffdecode functions. */
@@ -37,7 +37,7 @@ int ffpy_refresh_event(struct VideoState *vs);
void ffpy_init(int rate, int status);
int ffpy_audio_decode(struct VideoState *is, Uint8 *stream, int len);
/* The current Python. */
PyInterpreterState* interp;
PyThreadState* thread = NULL;
@@ -47,7 +47,7 @@ static void incref(PyObject *ref) {
PyEval_AcquireLock();
oldstate = PyThreadState_Swap(thread);
Py_INCREF(ref);
Py_INCREF(ref);
PyThreadState_Swap(oldstate);
PyEval_ReleaseLock();
}
@@ -57,7 +57,7 @@ static void decref(PyObject *ref) {
PyEval_AcquireLock();
oldstate = PyThreadState_Swap(thread);
Py_DECREF(ref);
Py_DECREF(ref);
PyThreadState_Swap(oldstate);
PyEval_ReleaseLock();
}
@@ -116,9 +116,9 @@ struct Channel {
/* Is the playing sample tight? */
int playing_tight;
/* The queued up sample. */
struct VideoState *queued;
struct VideoState *queued;
/* The name of the queued up sample. */
PyObject *queued_name;
@@ -128,17 +128,17 @@ struct Channel {
/* Is the queued sample tight? */
int queued_tight;
/* Is this channel paused? */
int paused;
/* The volume of the channel. */
int volume;
/* The position (in bytes) that this channel has queued to. */
int pos;
/*
/*
* The number of bytes for each step of fade.
* 0 when no fade is in progress.
*/
@@ -152,7 +152,7 @@ struct Channel {
/* The change in fade_vol for each step. */
int fade_delta;
/* The number of bytes in which we'll stop. */
int stop_bytes;
@@ -215,7 +215,7 @@ static float interpolate_pan(struct Channel *c) {
done = 1.0 * c->pan_done / c->pan_length;
return c->pan_start + done * (c->pan_end - c->pan_start);
}
static float interpolate_vol2(struct Channel *c) {
@@ -250,7 +250,7 @@ static void start_sample(struct Channel* c, int reset_fade) {
c->pos = 0;
if (reset_fade) {
if (c->playing_fadein == 0) {
c->fade_step_len = 0;
} else {
@@ -268,7 +268,7 @@ static void start_sample(struct Channel* c, int reset_fade) {
}
c->stop_bytes = -1;
}
}
}
static void free_sample(struct VideoState *ss) {
@@ -294,7 +294,7 @@ static void mixaudio(Uint8 *dst, Uint8 *src, int length, int volume) {
}
*sdst++ = (short) sound;
ssrc++;
ssrc++;
}
}
@@ -304,7 +304,7 @@ static void fade_mixaudio(struct Channel *c,
Uint8 *dst, Uint8 *src, int length) {
while (length) {
// No fade case.
if (c->fade_step_len == 0) {
mixaudio(dst, src, length, c->volume);
@@ -316,14 +316,14 @@ static void fade_mixaudio(struct Channel *c,
int l = min(c->fade_step_len - c->fade_off, length);
mixaudio(dst, src, l, c->fade_vol);
length -= l;
dst += l;
src += l;
c->fade_off += l;
continue;
}
// Otherwise, we have no space left in the current fade step.
// Go to the next step.
c->fade_off = 0;
@@ -333,14 +333,14 @@ static void fade_mixaudio(struct Channel *c,
if (c->fade_vol <= 0) {
c->fade_vol = 0;
}
// Stop on a fadein.
if (c->fade_vol >= c->volume) {
c->fade_vol = c->volume;
c->fade_step_len = 0;
}
}
return;
}
@@ -365,14 +365,14 @@ static void pan_audio(struct Channel *c, Uint8 *stream, int length) {
float vol2;
int left = 256;
int right = 256;
for (i = 0; i < length; i++) {
if ((i & 0x1f) == 0) {
pan = interpolate_pan(c);
vol2 = interpolate_vol2(c);
// If nothing to do, skip 32 samples.
if (pan == 0.0 && vol2 == 1.0) {
i += 31;
@@ -402,7 +402,7 @@ static void pan_audio(struct Channel *c, Uint8 *stream, int length) {
c->pan_done += 1;
c->vol2_done += 1;
}
}
static void callback(void *userdata, Uint8 *stream, int length) {
@@ -410,7 +410,7 @@ static void callback(void *userdata, Uint8 *stream, int length) {
for (channel = 0; channel < num_channels; channel++) {
int mixed = 0;
struct Channel *c = &channels[channel];
@@ -430,10 +430,10 @@ static void callback(void *userdata, Uint8 *stream, int length) {
// Decode some amount of data.
bytes = ffpy_audio_decode(c->playing, buffer, mixleft);
// We have some data in the buffer.
if (c->stop_bytes && bytes) {
if (c->stop_bytes != -1)
bytes = min(c->stop_bytes, bytes);
@@ -441,12 +441,12 @@ static void callback(void *userdata, Uint8 *stream, int length) {
fade_mixaudio(c, &stream[mixed], buffer, bytes);
mixed += bytes;
if (c->stop_bytes != -1)
c->stop_bytes -= bytes;
c->pos += bytes;
continue;
}
@@ -458,14 +458,14 @@ static void callback(void *userdata, Uint8 *stream, int length) {
int old_tight = c->playing_tight;
struct Dying *d;
post_event(c);
d = malloc(sizeof(struct Dying));
d->next = dying;
d->stream = c->playing;
dying = d;
LOCK_NAME();
decref(c->playing_name);
@@ -474,17 +474,17 @@ static void callback(void *userdata, Uint8 *stream, int length) {
c->playing_name = c->queued_name;
c->playing_fadein = c->queued_fadein;
c->playing_tight = c->queued_tight;
c->queued = NULL;
c->queued_name = NULL;
c->queued_fadein = 0;
c->queued_tight = 0;
UNLOCK_NAME();
start_sample(c, ! old_tight);
continue;
continue;
}
}
@@ -508,14 +508,14 @@ static int check_channel(int c) {
if (c >= num_channels) {
channels = realloc(channels, sizeof(struct Channel) * (c + 1));
for (i = num_channels; i <= c; i++) {
channels[i].playing = NULL;
channels[i].queued = NULL;
channels[i].playing_name = NULL;
channels[i].queued_name = NULL;
channels[i].volume = SDL_MIX_MAXVOLUME;
channels[i].volume = SDL_MIX_MAXVOLUME;
channels[i].paused = 1;
channels[i].event = 0;
channels[i].pan_start = 0.0;
@@ -530,7 +530,7 @@ static int check_channel(int c) {
num_channels = c + 1;
}
return 0;
}
@@ -540,16 +540,16 @@ static int check_channel(int c) {
* failure.
*/
struct VideoState *load_sample(SDL_RWops *rw, const char *ext) {
struct VideoState *rv;
struct VideoState *rv;
rv = ffpy_stream_open(rw, ext);
return rv;
}
void PSS_play(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int fadein, int tight, int paused) {
BEGIN();
struct Channel *c;
if (check_channel(channel)) {
@@ -558,7 +558,7 @@ void PSS_play(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int f
c = &channels[channel];
ENTER();
LOCK_NAME();
/* Free playing and queued samples. */
@@ -569,7 +569,7 @@ void PSS_play(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int f
c->playing_name = NULL;
c->playing_tight = 0;
}
if (c->queued) {
free_sample(c->queued);
c->queued = NULL;
@@ -579,7 +579,7 @@ void PSS_play(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int f
}
/* Allocate playing sample. */
c->playing = load_sample(rw, ext);
if (! c->playing) {
@@ -594,11 +594,11 @@ void PSS_play(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int f
c->playing_fadein = fadein;
c->playing_tight = tight;
c->paused = paused;
start_sample(c, 1);
start_sample(c, 1);
/* update_pause(); */
UNLOCK_NAME();
EXIT();
@@ -608,7 +608,7 @@ void PSS_play(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int f
void PSS_queue(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int fadein, int tight) {
BEGIN();
struct Channel *c;
if (check_channel(channel)) {
@@ -616,18 +616,18 @@ void PSS_queue(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int
}
c = &channels[channel];
ENTER();
/* If we're not playing, then we should play instead of queue. */
if (!c->playing) {
EXIT();
PSS_play(channel, rw, ext, name, fadein, tight, 0);
return;
return;
}
/* Free queued sample. */
if (c->queued) {
free_sample(c->queued);
c->queued = NULL;
@@ -635,7 +635,7 @@ void PSS_queue(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int
c->queued_name = NULL;
c->queued_tight = 0;
}
/* Allocate queued sample. */
c->queued = load_sample(rw, ext);
@@ -649,11 +649,11 @@ void PSS_queue(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int
c->queued_name = name;
c->queued_fadein = fadein;
c->queued_tight = tight;
EXIT();
error(SUCCESS);
}
/*
* Stops all music from playing, freeing the data used by the
@@ -676,7 +676,7 @@ void PSS_stop(int channel) {
if (c->playing) {
post_event(c);
}
/* Free playing and queued samples. */
if (c->playing) {
free_sample(c->playing);
@@ -684,18 +684,18 @@ void PSS_stop(int channel) {
decref(c->playing_name);
c->playing_name = NULL;
}
if (c->queued) {
free_sample(c->queued);
c->queued = NULL;
decref(c->queued_name);
c->queued_name = NULL;
}
/* update_pause(); */
UNLOCK_NAME();
EXIT();
EXIT();
error(SUCCESS);
}
@@ -731,8 +731,8 @@ void PSS_dequeue(int channel, int even_tight) {
}
EXIT();
EXIT();
error(SUCCESS);
}
@@ -757,8 +757,8 @@ int PSS_queue_depth(int channel) {
if (c->playing) rv++;
if (c->queued) rv++;
EXIT();
EXIT();
error(SUCCESS);
return rv;
@@ -767,7 +767,7 @@ int PSS_queue_depth(int channel) {
PyObject *PSS_playing_name(int channel) {
BEGIN();
PyObject *rv;
struct Channel *c;
if (check_channel(channel)) {
@@ -795,7 +795,7 @@ PyObject *PSS_playing_name(int channel) {
ALTEXIT();
error(SUCCESS);
return rv;
}
@@ -826,7 +826,7 @@ void PSS_fadeout(int channel, int ms) {
}
fade_steps = c->volume;
c->fade_delta = -1;
c->fade_off = 0;
@@ -838,15 +838,15 @@ void PSS_fadeout(int channel, int ms) {
} else {
c->fade_step_len = 0;
}
c->stop_bytes = ms_to_bytes(ms);
c->queued_tight = 0;
if (!c->queued) {
c->playing_tight = 0;
}
EXIT();
EXIT();
error(SUCCESS);
}
@@ -856,7 +856,7 @@ void PSS_fadeout(int channel, int ms) {
*/
void PSS_pause(int channel, int pause) {
BEGIN();
struct Channel *c;
if (check_channel(channel)) {
@@ -872,13 +872,13 @@ void PSS_pause(int channel, int pause) {
EXIT();
error(SUCCESS);
}
void PSS_unpause_all(void) {
int i;
BEGIN();
ENTER();
@@ -890,7 +890,7 @@ void PSS_unpause_all(void) {
EXIT();
error(SUCCESS);
}
/*
@@ -901,7 +901,7 @@ int PSS_get_pos(int channel) {
struct Channel *c;
BEGIN();
if (check_channel(channel)) {
return -1;
}
@@ -909,7 +909,7 @@ int PSS_get_pos(int channel) {
c = &channels[channel];
ENTER();
if (c->playing) {
rv = bytes_to_ms(c->pos);
} else {
@@ -917,7 +917,7 @@ int PSS_get_pos(int channel) {
}
EXIT();
error(SUCCESS);
return rv;
}
@@ -929,7 +929,7 @@ int PSS_get_pos(int channel) {
void PSS_set_endevent(int channel, int event) {
struct Channel *c;
BEGIN();
if (check_channel(channel)) {
return;
}
@@ -937,12 +937,12 @@ void PSS_set_endevent(int channel, int event) {
c = &channels[channel];
ENTER();
c->event = event;
EXIT();
error(SUCCESS);
error(SUCCESS);
}
/*
@@ -952,7 +952,7 @@ void PSS_set_endevent(int channel, int event) {
void PSS_set_volume(int channel, float volume) {
struct Channel *c;
BEGIN();
if (check_channel(channel)) {
return;
}
@@ -960,12 +960,12 @@ void PSS_set_volume(int channel, float volume) {
c = &channels[channel];
ENTER();
c->volume = (int) (volume * SDL_MIX_MAXVOLUME);
EXIT();
error(SUCCESS);
error(SUCCESS);
}
@@ -973,10 +973,10 @@ void PSS_set_volume(int channel, float volume) {
float PSS_get_volume(int channel) {
float rv;
struct Channel *c;
BEGIN();
if (check_channel(channel)) {
return 0.0;
}
@@ -984,12 +984,12 @@ float PSS_get_volume(int channel) {
c = &channels[channel];
ENTER();
rv = 1.0 * c->volume / SDL_MIX_MAXVOLUME;
EXIT();
error(SUCCESS);
error(SUCCESS);
return rv;
}
@@ -1000,7 +1000,7 @@ float PSS_get_volume(int channel) {
void PSS_set_pan(int channel, float pan, float delay) {
struct Channel *c;
BEGIN();
if (check_channel(channel)) {
return;
}
@@ -1008,15 +1008,15 @@ void PSS_set_pan(int channel, float pan, float delay) {
c = &channels[channel];
ENTER();
c->pan_start = interpolate_pan(c);
c->pan_end = pan;
c->pan_length = (int) (audio_spec.freq * delay);
c->pan_done = 0;
EXIT();
error(SUCCESS);
error(SUCCESS);
}
/*
@@ -1025,7 +1025,7 @@ void PSS_set_pan(int channel, float pan, float delay) {
void PSS_set_secondary_volume(int channel, float vol2, float delay) {
struct Channel *c;
BEGIN();
if (check_channel(channel)) {
return;
}
@@ -1038,10 +1038,10 @@ void PSS_set_secondary_volume(int channel, float vol2, float delay) {
c->vol2_end = vol2;
c->vol2_length = (int) (audio_spec.freq * delay);
c->vol2_done = 0;
EXIT();
error(SUCCESS);
error(SUCCESS);
}
@@ -1064,12 +1064,12 @@ void PSS_init(int freq, int stereo, int samples, int status) {
interp = thread->interp;
thread = PyThreadState_New(interp);
}
if (!thread) {
error(SDL_ERROR);
return;
}
if (SDL_Init(SDL_INIT_AUDIO)) {
error(SDL_ERROR);
return;
@@ -1090,7 +1090,7 @@ void PSS_init(int freq, int stereo, int samples, int status) {
ffpy_init(audio_spec.freq, status);
SDL_PauseAudio(0);
initialized = 1;
error(SUCCESS);
@@ -1102,7 +1102,7 @@ void PSS_quit() {
if (! initialized) {
return;
}
int i;
ENTER();
@@ -1130,14 +1130,14 @@ void PSS_periodic() {
}
ENTER();
while (dying) {
struct Dying *d = dying;
ffpy_stream_close(d->stream);
dying = d->next;
free(d);
}
EXIT();
}
+1 -1
View File
@@ -25,7 +25,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define PSS_H
#include <Python.h>
#include <SDL/SDL.h>
#include <SDL.h>
void PSS_play(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int fadeout, int tight, int paused);
void PSS_queue(int channel, SDL_RWops *rw, const char *ext, PyObject *name, int fadeout, int tight);
+5 -3
View File
@@ -20,11 +20,13 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
cdef extern from "pygame/pygame.h":
cdef extern from "SDL.h":
cdef struct SDL_RWops:
pass
void import_pygame_rwobject()
cdef extern from "pygame_sdl2/pygame_sdl2.rwobject_api.h":
void import_pygame_sdl2__rwobject()
SDL_RWops* RWopsFromPythonThreaded(object obj)
cdef extern from "pss.h":
@@ -187,4 +189,4 @@ def check_version(version):
if version < 2 or version > 4:
raise Exception("pysdlsound version mismatch.")
import_pygame_rwobject()
import_pygame_sdl2__rwobject()
+4 -3
View File
@@ -2,9 +2,10 @@
#define RENPY_H
#include <Python.h>
#include <SDL/SDL.h>
#include <SDL.h>
void core_init(void);
void subpixel_init(void);
void save_png_core(PyObject *pysurf, SDL_RWops *file, int compress);
@@ -62,7 +63,7 @@ void alphamunge_core(PyObject *pysrc,
int src_aoff, // alpha offset.
int dst_aoff, // alpha offset.
char *amap);
/* int stretch_core(PyObject *pysrc, */
/* PyObject *pydst, */
/* int x, */
@@ -114,4 +115,4 @@ int subpixel32(
float xoffset, float yoffset, int ashift);
#endif
#endif
+3 -3
View File
@@ -65,7 +65,7 @@ else:
include("zlib.h")
include("png.h")
include("SDL.h", directory="SDL")
include("SDL.h", directory="SDL2")
include("ft2build.h")
include("freetype/freetype.h", directory="freetype2", optional=True) or include("freetype.h", directory="freetype2")
include("libavutil/avstring.h")
@@ -74,7 +74,7 @@ include("libavcodec/avcodec.h")
include("libswscale/swscale.h")
include("GL/glew.h")
library("SDL")
library("SDL2")
library("png")
library("avformat")
library("avcodec")
@@ -91,7 +91,7 @@ has_angle = windows and library("EGL", optional=True) and library("GLESv2", opti
if android:
sdl = [ 'sdl', 'GLESv2', 'log' ]
else:
sdl = [ 'SDL' ]
sdl = [ 'SDL2' ]
if has_fribidi:
try:
+41 -35
View File
@@ -7,15 +7,21 @@
*/
#include "renpy.h"
#include <pygame/pygame.h>
#include <SDL.h>
#include <pygame_sdl2/pygame_sdl2.surface_api.h>
#include <stdio.h>
#include <math.h>
void subpixel_init() {
import_pygame_sdl2__surface();
}
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#define GCC_MMX 1
#include "mmx.h"
#endif
/* MMX Register assignments (between applications of the blitter core).
*
* mm0 - new row 0
@@ -33,7 +39,7 @@
* This is the basic algorithm that does the subpixel blit
* interpolation.
*************************************************************************/
/* mm2 = destination; */
/* unpack mm0; */
@@ -83,8 +89,8 @@
#define MMX_EXPAND() \
pxor_r2r(mm2, mm2); \
punpcklbw_r2r(mm2, mm4); \
punpcklbw_r2r(mm2, mm5);
punpcklbw_r2r(mm2, mm5);
// This expects the two old pixels to be arranged like:
// mm4 mm0
@@ -140,7 +146,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
float xoffset, float yoffset, int ashift) {
SDL_Surface *src;
SDL_Surface *dst;
int srcpitch, dstpitch;
int srcw, srch;
int dstw, dsth;
@@ -148,7 +154,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
unsigned char *dstpixels;
int xfrac, yfrac;
int xo, yo;
int xo, yo;
int sx, sy;
int draw_finalx;
@@ -158,7 +164,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
unsigned int pixel;
unsigned int blankpixel;
unsigned char *s0;
unsigned char *s1;
unsigned char *d;
@@ -170,12 +176,12 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
if (!SDL_HasMMX()) {
return 0;
}
src = PySurface_AsSurface(pysrc);
dst = PySurface_AsSurface(pydst);
Py_BEGIN_ALLOW_THREADS
srcpixels = (unsigned char *) src->pixels;
dstpixels = (unsigned char *) dst->pixels;
srcpitch = src->pitch;
@@ -186,7 +192,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
dsth = dst->h;
inverted_alpha_mask = ~(0xff << ashift);
// Due to mmx.
ashift *= 2;
@@ -216,7 +222,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
if (sx >= srcw - 1 || sy >= srch - 1) {
goto done;
}
// Figure out how many pixels we need to draw on each line.
normal_pixels = min(srcw - sx - 1, dstw - xo);
@@ -236,7 +242,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
punpckldq_r2r(mm7, mm7);
movd_m2r(ashift, mm3);
if (xo >= dstw) {
goto done;
}
@@ -244,27 +250,27 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
// Draw the first line, when sy == -1.
if (sy == -1) {
if (yo >= dsth) {
goto done;
}
s1 = srcpixels + sx * 4;
if (sx < 0) {
pixel = (* (unsigned int *) (s1 + 4)) & inverted_alpha_mask;
pixel = (* (unsigned int *) (s1 + 4)) & inverted_alpha_mask;
} else {
pixel = * (unsigned int *) s1;
}
blankpixel = pixel & inverted_alpha_mask;
movd_m2r(blankpixel, mm4);
movd_m2r(pixel, mm5);
MMX_EXPAND();
s1 += 4;
d = dstpixels + xo * 4 + yo * dstpitch;
dend = d + normal_pixels * 4;
@@ -272,7 +278,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
pixel = * (unsigned int *) s1;
blankpixel = pixel & inverted_alpha_mask;
movd_m2r(blankpixel, mm0);
movd_m2r(pixel, mm1);
movd_m2r(pixel, mm1);
MMX_INTERP(* (unsigned int *) d);
d += 4;
s1 += 4;
@@ -300,7 +306,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
s0 = srcpixels + sx * 4 + (srcpitch * sy);
s1 = srcpixels + sx * 4 + (srcpitch * (sy + 1));
if (sx < 0) {
blankpixel = (* (unsigned int *) (s0 + 4)) & inverted_alpha_mask;
movd_m2r(blankpixel, mm4);
@@ -314,20 +320,20 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
}
MMX_EXPAND();
s0 += 4;
s1 += 4;
d = dstpixels + xo * 4 + yo * dstpitch;
dend = d + normal_pixels * 4;
unsigned char *dp = d;
while (d != dend) {
movd_m2r(* (unsigned int *) s0, mm0);
movd_m2r(* (unsigned int *) s1, mm1);
movd_m2r(* (unsigned int *) s0, mm0);
movd_m2r(* (unsigned int *) s1, mm1);
MMX_INTERP(* (unsigned int *) d);
d += 4;
s0 += 4;
s1 += 4;
@@ -350,7 +356,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
}
// The final part, where we handle the bottom line of the source surface.
if (yo >= dsth) {
goto done;
}
@@ -360,29 +366,29 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
if (sx < 0) {
pixel = * (unsigned int *) (s0 + 4);
blankpixel = pixel & inverted_alpha_mask;
movd_m2r(blankpixel, mm4);
movd_m2r(blankpixel, mm5);
} else {
pixel = * (unsigned int *) s0;
blankpixel = pixel & inverted_alpha_mask;
movd_m2r(pixel, mm4);
movd_m2r(blankpixel, mm5);
}
MMX_EXPAND();
s0 += 4;
d = dstpixels + xo * 4 + yo * dstpitch;
dend = d + normal_pixels * 4;
while (d != dend) {
pixel = * (unsigned int *) s0;
blankpixel = pixel & inverted_alpha_mask;
movd_m2r(pixel, mm0);
movd_m2r(pixel, mm0);
movd_m2r(blankpixel, mm1);
MMX_INTERP(* (unsigned int *) d);
d += 4;
@@ -395,7 +401,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
MMX_INTERP(* (unsigned int *) d);
}
done:
// Reset the MMX unit and call it a night.
@@ -403,7 +409,7 @@ done:
Py_END_ALLOW_THREADS
return 1;
}
+2 -1
View File
@@ -40,7 +40,7 @@ except ImportError:
vc_version = 0
# The tuple giving the version number.
version_tuple = (6, 18, 2, vc_version)
version_tuple = (6, 18, 3, vc_version)
# The name of this version.
version_name = "... through shared popular culture."
@@ -323,6 +323,7 @@ def import_all():
import renpy.sl2
update_path(renpy.sl2)
import renpy.sl2.slast
import renpy.sl2.slparser
import renpy.sl2.sldisplayables
+8 -8
View File
@@ -1283,10 +1283,13 @@ class Call(Node):
renpy.store._kwargs = kwargs
def predict(self):
label = self.label
if self.expression:
return [ ]
else:
return [ renpy.game.script.lookup(self.label) ]
label = renpy.python.py_eval(label)
return [ renpy.game.context().predict_call(label, self.next.name) ]
def scry(self):
rv = Node.scry(self)
@@ -1328,11 +1331,8 @@ class Return(Node):
next_node(renpy.game.context().lookup_return(pop=True))
def predict(self):
site = renpy.game.context().lookup_return(pop=False)
if site:
return [ site ]
else:
return [ ]
return [ renpy.game.context().predict_return() ]
def scry(self):
rv = Node.scry(self)
+19 -8
View File
@@ -1301,10 +1301,13 @@ class Time(Statement):
class RawOn(RawStatement):
def __init__(self, loc, name, block):
def __init__(self, loc, names, block):
super(RawOn, self).__init__(loc)
self.handlers = { name : block }
self.handlers = { }
for i in names:
self.handlers[i] = block
def compile(self, ctx): #@ReservedAssignment
@@ -1352,14 +1355,14 @@ class On(Statement):
# handle it.
if event in self.handlers:
# Do not allow people to abort the hide handler with another
# event.
if name != "hide":
# Do not allow people to abort the hide or replaced event.
lock_event = (name == "hide" and trans.hide_request) or (name == "replaced" and trans.replaced_request)
if not lock_event:
name = event
start = st
cstate = None
while True:
# If we don't have a handler, return until we change event.
@@ -1533,14 +1536,22 @@ def parse_atl(l):
elif l.keyword('on'):
name = l.require(l.word)
names = [ l.require(l.word) ]
while l.match(','):
name = l.word()
if name is None:
break
names.append(name)
l.require(':')
l.expect_eol()
l.expect_block('on')
block = parse_atl(l.subblock_lexer())
statements.append(RawOn(loc, name, block))
statements.append(RawOn(loc, names, block))
elif l.keyword('time'):
time = l.require(l.simple_expression)
+2
View File
@@ -225,6 +225,8 @@ def bootstrap(renpy_base):
if renpy.macintosh:
os.startfile = mac_start
import pygame_sdl2
pygame_sdl2.import_as_pygame()
# Check that we have installed pygame properly. This also deals with
# weird cases on Windows and Linux where we can't import modules. (On
+1 -1
View File
@@ -404,7 +404,7 @@ def display_say(
# Figure out which pause we're on. (Or set the pause to None in
# order to put us in all-at-once mode.)
if not interact:
if not interact or renpy.game.preferences.self_voicing:
all_at_once = True
dtt = DialogueTextTags(what)
+81 -12
View File
@@ -84,8 +84,9 @@ init -1600 python:
return self.dict[self.key] == self.value
@renpy.pure
def SetScreenVariable(name, value):
class SetScreenVariable(Action, FieldEquality):
"""
:doc: data_action
@@ -93,11 +94,34 @@ init -1600 python:
be set to `value`.
"""
cs = renpy.current_screen()
if cs is not None:
return SetDict(cs.scope, name, value)
else:
return None
identity_fields = [ "name", "value" ]
def __init__(self, name, value):
self.name = name
self.value = value
def __call__(self):
cs = renpy.current_screen()
if cs is None:
return
cs.scope[self.name] = self.value
renpy.restart_interaction()
def get_selected(self):
cs = renpy.current_screen()
if cs is None:
return False
if self.name not in cs.scope:
return False
return cs.scope[self.name] == self.value
@renpy.pure
class ToggleField(Action, FieldEquality):
@@ -162,6 +186,8 @@ init -1600 python:
return ToggleField(store, variable, true_value=true_value, false_value=false_value)
@renpy.pure
class ToggleDict(Action, FieldEquality):
"""
@@ -202,6 +228,9 @@ init -1600 python:
renpy.restart_interaction()
def get_selected(self):
if self.key not in self.dict:
return False
rv = self.dict[self.key]
if self.true_value is not None:
@@ -209,8 +238,10 @@ init -1600 python:
return rv
@renpy.pure
def ToggleScreenVariable(name, true_value=None, false_value=None):
class ToggleScreenVariable(Action, FieldEquality):
"""
:doc: data_action
@@ -222,10 +253,48 @@ init -1600 python:
If not None, then this is the false value we use.
"""
cs = renpy.current_screen()
identity_fields = [ "name", "true_value", "false_value" ]
if cs is not None:
return ToggleDict(cs.scope, name, true_value=true_value, false_value=None)
else:
return None
def __init__(self, name, true_value=None, false_value=None):
self.name = name
self.true_value = true_value
self.false_value = false_value
def __call__(self):
cs = renpy.current_screen()
if cs is None:
return
value = cs.scope[self.name]
if self.true_value is not None:
value = (value == self.true_value)
value = not value
if self.true_value is not None:
if value:
value = self.true_value
else:
value = self.false_value
cs.scope[self.name] = value
renpy.restart_interaction()
def get_selected(self):
cs = renpy.current_screen()
if cs is None:
return False
if self.name not in cs.scope:
return False
rv = cs.scope[self.name]
if self.true_value is not None:
rv = (rv == self.true_value)
return rv
+36 -12
View File
@@ -92,12 +92,9 @@ init -1700 python:
config.empty_window = _default_empty_window
style.skip_indicator = Style(style.default, heavy=True, help='The skip indicator.')
style.skip_indicator.xpos = 10
style.skip_indicator.ypos = 10
init -1700 python:
##########################################################################
# Extend
config.extend_interjection = "{fast}"
@@ -121,6 +118,10 @@ init -1700 python:
extend.record_say = False
##########################################################################
# Self-voicing
def sv(what, interact=True):
"""
Uses the narrator to speak `what` iff self-voicing is enabled.
@@ -130,9 +131,14 @@ init -1700 python:
return narrator(what, interact=interact)
init -1700 python:
##########################################################################
# Skip indicator
def skip_indicator():
style.skip_indicator = Style(style.default, heavy=True, help='The skip indicator.')
style.skip_indicator.xpos = 10
style.skip_indicator.ypos = 10
def _skip_indicator():
### skip_indicator default
# (text) The style and placement of the skip indicator.
@@ -155,10 +161,30 @@ init -1700 python:
ui.add(renpy.easy.displayable(config.skip_indicator))
config.overlay_functions.append(skip_indicator)
config.overlay_functions.append(_skip_indicator)
##########################################################################
# Predictions
# A list of labels we predict at start time.
config.predict_start_labels = [ "start" ]
# Prediction of statements.
def _predict_statements(current):
if main_menu:
rv = list(config.predict_start_labels)
rv.append(current)
return rv
return [ current ]
config.predict_statements_callback = _predict_statements
# Prediction of screens.
def predict():
def _predict_screens():
s = _game_menu_screen
@@ -175,10 +201,8 @@ init -1700 python:
renpy.predict_screen(s)
return
config.predict_callbacks.append(_predict_screens)
config.predict_callbacks.append(predict)
init -1700 python:
##########################################################################
# Side Images
+105 -5
View File
@@ -21,7 +21,7 @@
# This code applies an update.
init -1500 python in updater:
from store import renpy, config, Action, DictEquality
from store import renpy, config, Action, DictEquality, persistent
import store.build as build
import tarfile
@@ -47,6 +47,14 @@ init -1500 python in updater:
from renpy.exports import fsencode
# A map from update URL to the last version found at that URL.
if persistent._update_version is None:
persistent._update_version = { }
# A map from update URL to the time we last checked that URL.
if persistent._update_last_checked is None:
persistent._update_last_checked = { }
# A file containing deferred update commands, one per line. Right now,
# there are two commands:
# R <path>
@@ -202,7 +210,7 @@ init -1500 python in updater:
# The update was cancelled.
CANCELLED = "CANCELLED"
def __init__(self, url, base, force=False, public_key=None, simulate=None, add=[], restart=True):
def __init__(self, url, base=None, force=False, public_key=None, simulate=None, add=[], restart=True, check_only=False):
"""
Takes the same arguments as update().
"""
@@ -236,11 +244,15 @@ init -1500 python in updater:
# Force the update?
self.force = force
# Packages to add during the update.
self.add = add
# Do we need to restart Ren'Py at the end?
self.restart = restart
# Packages to add during the update.
self.add = add
# If true, we check for an update, and update persistent._update_version
# as appropriate.
self.check_only = check_only
# The base path of the game that we're updating, and the path to the update
# directory underneath it.
@@ -359,6 +371,14 @@ init -1500 python in updater:
self.can_cancel = False
self.can_proceed = True
self.state = self.UPDATE_NOT_AVAILABLE
persistent._update_version[self.url] = None
renpy.restart_interaction()
return
persistent._update_version[self.url] = pretty_version
if self.check_only:
renpy.restart_interaction()
return
if not self.add:
@@ -370,6 +390,8 @@ init -1500 python in updater:
self.state = self.UPDATE_AVAILABLE
self.version = pretty_version
renpy.restart_interaction()
while True:
if self.cancelled or self.proceeded:
break
@@ -384,6 +406,7 @@ init -1500 python in updater:
# Perform the update.
self.new_state = dict(self.current_state)
renpy.restart_interaction()
self.progress = 0.0
self.state = self.PREPARING
@@ -393,6 +416,7 @@ init -1500 python in updater:
self.progress = 0.0
self.state = self.DOWNLOADING
renpy.restart_interaction()
for i in self.modules:
self.download(i)
@@ -402,12 +426,14 @@ init -1500 python in updater:
self.can_cancel = False
self.progress = 0.0
self.state = self.UNPACKING
renpy.restart_interaction()
for i in self.modules:
self.unpack(i)
self.progress = None
self.state = self.FINISHING
renpy.restart_interaction()
self.move_files()
self.delete_obsolete()
@@ -419,11 +445,15 @@ init -1500 python in updater:
self.can_proceed = True
self.can_cancel = False
persistent._update_version[self.url] = None
if self.restart:
self.state = self.DONE
else:
self.state = self.DONE_NO_RESTART
renpy.restart_interaction()
return
def simulation(self):
@@ -451,6 +481,14 @@ init -1500 python in updater:
self.can_cancel = False
self.can_proceed = True
self.state = self.UPDATE_NOT_AVAILABLE
persistent._update_version[self.url] = None
return
pretty_version = build.version or build.directory_name
persistent._update_version[self.url] = pretty_version
if self.check_only:
renpy.restart_interaction()
return
# Confirm with the user that the update is available.
@@ -458,7 +496,7 @@ init -1500 python in updater:
self.can_cancel = True
self.can_proceed = True
self.state = self.UPDATE_AVAILABLE
self.version = build.version or build.directory_name
self.version = pretty_version
while True:
if self.cancelled or self.proceeded:
@@ -473,22 +511,26 @@ init -1500 python in updater:
self.progress = 0.0
self.state = self.PREPARING
renpy.restart_interaction()
simulate_progress()
self.progress = 0.0
self.state = self.DOWNLOADING
renpy.restart_interaction()
simulate_progress()
self.can_cancel = False
self.progress = 0.0
self.state = self.UNPACKING
renpy.restart_interaction()
simulate_progress()
self.progress = None
self.state = self.FINISHING
renpy.restart_interaction()
time.sleep(1.5)
@@ -497,11 +539,15 @@ init -1500 python in updater:
self.can_proceed = True
self.can_cancel = False
persistent._update_version[self.url] = None
if self.restart:
self.state = self.DONE
else:
self.state = self.DONE_NO_RESTART
renpy.restart_interaction()
return
def proceed(self):
@@ -1106,6 +1152,7 @@ init -1500 python in updater:
installed_packages_cache = None
def get_installed_packages(base=None):
"""
:doc: updater
@@ -1137,6 +1184,7 @@ init -1500 python in updater:
installed_packages_cache = rv
return rv
def can_update(base=None):
"""
:doc: updater
@@ -1144,6 +1192,10 @@ init -1500 python in updater:
Returns true if it's possible that an update can succeed. Returns false
if updating is totally impossible. (For example, if the update directory
was deleted.)
Note that this does not determine if an update is actually available.
To do that, use :func:`updater.UpdateVersion`.
"""
if rsa is None:
@@ -1151,6 +1203,7 @@ init -1500 python in updater:
return not not get_installed_packages(base)
def update(url, base=None, force=False, public_key=None, simulate=None, add=[], restart=True):
"""
:doc: updater
@@ -1196,6 +1249,7 @@ init -1500 python in updater:
ui.timer(.1, repeat=True, action=renpy.restart_interaction)
renpy.call_screen("updater", u=u)
@renpy.pure
class Update(Action, DictEquality):
"""
@@ -1212,6 +1266,52 @@ init -1500 python in updater:
def __call__(self):
renpy.invoke_in_new_context(update, *self.args, **self.kwargs)
# A list of URLs that we've checked for the update version.
checked = set()
def UpdateVersion(url, check_interval=3600*6, simulate=None, **kwargs):
"""
:doc: updater
This function contacts the server at `url`, and determines if there is
a newer version of software available at that url. If there is, this
function returns the new version. Otherwise, it returns None.
Since contacting the server can take some time, this function launches
a thread in the background, and immediately returns the version from
the last time the server was contacted, or None if the server has never
been contacted. The background thread will restart the current interaction
once the server has been contacted, which will cause screens that call
this function to update.
Each url will be contacted at most once per Ren'Py session, and not
more than once every `check_interval` seconds. When the server is not
contacted, cached data will be returned.
Additional keyword arguments (including `simulate`) are passed to the
update mechanism as if they were given to :func:`updater.update`.
"""
if not can_update() and not simulate:
return None
check = True
if url in checked:
check = False
if time.time() < persistent._update_last_checked.get(url, 0) + check_interval:
check = False
if check:
checked.add(url)
persistent._update_last_checked[url] = time.time()
Updater(url, check_only=True, simulate=simulate, **kwargs)
return persistent._update_version.get(url, None)
def update_command():
import time
+4
View File
@@ -534,6 +534,10 @@ emphasize_audio_time = 0.5
# Should we transition screens, or always use their new states.
transition_screens = True
# A function that given the current statement identifier, returns a list
# of statement identifiers that should be predicted.
predict_statements_callback = None
del renpy
del os
+17 -16
View File
@@ -30,29 +30,30 @@ from renpy.display.core import absolute
# Surface copying
################################################################################
from pygame cimport *
def nogil_copy(src, dest):
"""
Does a gil-less blit of src to dest, with minimal locking.
"""
cdef SDL_Surface *src_surf
cdef SDL_Surface *dst_surf
dest.blit(src, (0, 0))
src_surf = PySurface_AsSurface(src)
dest_surf = PySurface_AsSurface(dest)
old_alpha = src_surf.flags & SDL_SRCALPHA
if old_alpha:
SDL_SetAlpha(src_surf, 0, 255)
with nogil:
SDL_BlitSurface(src_surf, NULL, dest_surf, NULL)
if old_alpha:
SDL_SetAlpha(src_surf, SDL_SRCALPHA, 255)
# cdef SDL_Surface *src_surf
# cdef SDL_Surface *dst_surf
#
# src_surf = PySurface_AsSurface(src)
# dest_surf = PySurface_AsSurface(dest)
#
# old_alpha = src_surf.flags & SDL_SRCALPHA
#
# if old_alpha:
# SDL_SetSurfaceAlpha(src_surf, 0, 255)
#
# with nogil:
# SDL_BlitSurface(src_surf, NULL, dest_surf, NULL)
#
# if old_alpha:
# SDL_SetAlpha(src_surf, SDL_SRCALPHA, 255)
################################################################################
# Transform render function
+4
View File
@@ -184,6 +184,9 @@ class Displayable(renpy.object.Object):
# to.) If None, it is itself.
_main = None
# A list of the children that make up this composite displayable.
_composite_parts = [ ]
# The location the displayable was created at, if known.
_location = None
@@ -415,6 +418,7 @@ class Displayable(renpy.object.Object):
return
self.transform_event = event
if self.transform_event_responder:
renpy.display.render.redraw(self, 0)
+18 -11
View File
@@ -128,15 +128,15 @@ def focus_coordinates():
return None, None, None, None
# This is called before each interaction. It's purpose is to choose
# the widget that is focused, and to mark it as focused and all of
# the other widgets as unfocused.
# The new grab widget. (The one that replaced the old grab widget at the start
# of the interaction.)
new_grab = None
# A map from id(displayable) to the displayable that replaces it.
replaced_by = { }
def before_interact(roots):
"""
Called before each interaction to choose the focused and grabbed
displayables.
"""
global new_grab
global grab
@@ -160,13 +160,17 @@ def before_interact(roots):
f.full_focus_name = n, serial
if (f is grab) and (new_grab is None):
new_grab = f
replaced_by[id(f)] = f
# We assume id(None) is not in replaced_by.
replaced_by.pop(None, None)
# If there's something with the same full name as the current widget,
# it becomes the new current widget.
current = get_focused()
current = replaced_by.get(id(current), current)
if current is not None:
current_name = current.full_focus_name
@@ -199,8 +203,11 @@ def before_interact(roots):
if current:
current.focus(default=True)
grab = new_grab
new_grab = None
# Update the grab.
grab = replaced_by.get(id(grab), None)
# Clear replaced_by.
replaced_by.clear()
# This changes the focus to be the widget contained inside the new
# focus object.
+13
View File
@@ -1611,13 +1611,26 @@ class Side(Container):
if isinstance(positions, basestring):
positions = positions.split()
seen = set()
for i in positions:
if not i in Side.possible_positions:
raise Exception("Side used with impossible position '%s'." % (i,))
if i in seen:
raise Exception("Side used with duplicate position '%s'." % (i,))
seen.add(i)
self.positions = tuple(positions)
self.sized = False
def add(self, d):
if len(self.children) >= len(self.positions):
raise Exception("Side has been given too many arguments.")
super(Side, self).add(d)
def _clear(self):
super(Side, self)._clear()
self.sized = False
+13
View File
@@ -703,6 +703,16 @@ class Transform(Container):
if not self.child:
return None
# Prevent time from ticking backwards, as can happen if we replace a
# transform but keep its state.
if st + self.st_offset <= self.st:
self.st_offset = self.st - st
if at + self.at_offset <= self.at:
self.at_offset = self.at - at
self.st = st = st + self.st_offset
self.at = at = at + self.at_offset
if not (self.hide_request or self.replaced_request):
d = self.copy()
else:
@@ -752,6 +762,9 @@ class Transform(Container):
This updates the state to that at self.st, self.at.
"""
self.hide_response = True
self.replaced_response = True
# If we have to, call the function that updates this transform.
if self.arguments is not None:
self.default_function(self, self.st, self.at)
+60 -11
View File
@@ -423,6 +423,39 @@ class Context(renpy.object.Object):
return rv
def predict_call(self, label, return_site):
"""
This is called by the prediction code to indicate that a call to
`label` will occur.
`return_site`
The name of the return site to push on the predicted return
stack.
Returns the node corresponding to `label`
"""
self.predict_return_stack = list(self.predict_return_stack)
self.predict_return_stack.append(return_site)
return renpy.game.script.lookup(label)
def predict_return(self):
"""
This predicts that a return will occur.
It returns the node we predict will be returned to.
"""
if not self.predict_return_stack:
return None
self.predict_return_stack = list(self.predict_return_stack)
label = self.predict_return_stack.pop()
return renpy.game.script.lookup(label)
def predict(self):
"""
Performs image prediction, calling the given callback with each
@@ -433,31 +466,48 @@ class Context(renpy.object.Object):
if not self.current:
return
if renpy.config.predict_statements_callback is None:
return
old_images = self.images
nodes = [ (renpy.game.script.lookup(self.current), self.images) ]
node_set = set()
# A worklist of (node, images, return_stack) tuples.
nodes = [ ]
# The set of nodes we've seen. (We only consider each node once.)
seen = set()
# Find the roots.
for label in renpy.config.predict_statements_callback(self.current):
node = renpy.game.script.lookup(label)
if node in seen:
continue
nodes.append((node, self.images, self.return_stack))
seen.add(node)
# Predict statements.
for i in range(0, renpy.config.predict_statements):
if i >= len(nodes):
break
node, images = nodes[i]
node, images, return_stack = nodes[i]
self.images = renpy.display.image.ShownImageInfo(images)
# Ignore exceptions in prediction, so long as
# prediction is not needed.
self.predict_return_stack = return_stack
try:
for n in node.predict():
if n is None:
continue
if n not in node_set:
nodes.append((n, self.images))
node_set.add(n)
if n not in seen:
nodes.append((n, self.images, self.predict_return_stack))
seen.add(n)
except:
if renpy.config.debug_image_cache:
@@ -467,9 +517,8 @@ class Context(renpy.object.Object):
traceback.print_exc()
print "While predicting images."
# We accept that sometimes prediction won't work.
self.images = old_images
self.predict_return_stack = None
yield True
+27
View File
@@ -98,6 +98,7 @@ renpy_pure("check_text_tags")
import time
import sys
import threading
def public_api():
"""
@@ -2789,3 +2790,29 @@ def set_return_stack(stack):
"""
renpy.game.context().set_return_stack(stack)
def invoke_in_thread(fn, *args, **kwargs):
"""
:doc: other
Invokes the function `fn` in a background thread, passing it the
provided arguments and keyword arguments. Restarts the interaction
once the thread returns.
This function creates a daemon thread, which will be automatically
stopped when Ren'Py is shutting down.
"""
def run():
try:
fn(*args, **kwargs)
except:
import traceback
traceback.print_exc()
restart_interaction()
t = threading.Thread(target=run)
t.daemon = True
t.start()
+5 -1
View File
@@ -24,9 +24,12 @@
DEF ANGLE = False
from libc.stdlib cimport malloc, free
from pygame cimport *
from sdl2 cimport *
from gl cimport *
from pygame_sdl2 cimport *
import_pygame_sdl2__surface()
import renpy
import pygame
import os
@@ -40,6 +43,7 @@ cimport gltexture
import gltexture
import glblacklist
cdef extern from "glcompat.h":
GLenum glewInit()
GLubyte *glewGetErrorString(GLenum)
+7 -2
View File
@@ -25,7 +25,10 @@ DEF ANGLE = False
from gl cimport *
from gldraw cimport *
from pygame cimport *
from sdl2 cimport *
from pygame_sdl2 cimport *
import_pygame_sdl2__surface()
from cpython.string cimport PyString_FromStringAndSize
from libc.stdlib cimport calloc, free
@@ -1112,7 +1115,9 @@ def premultiply(
cdef unsigned char *out = rv
# The pixels in the source image.
cdef unsigned char *pixels, *pixels_end
cdef unsigned char *pixels
cdef unsigned char *pixels_end
cdef SDL_Surface *surf
# Pointer to the current pixel.
+110 -8
View File
@@ -25,6 +25,7 @@ import linecache
import renpy.display
import renpy.pyanalysis
import renpy.sl2
from renpy.display.motion import Transform
from renpy.display.layout import Fixed
@@ -116,6 +117,10 @@ class SLContext(renpy.ui.Addable):
# once could be a performance problem.
self.predicted = set()
# True if we're in a true showif block, False if we're in a false showif
# block, or None if we're not in a showif block.
self.showif = None
def get_style_group(self):
style_prefix = self.style_prefix
@@ -381,6 +386,9 @@ class SLCache(object):
# or children are changed.
self.copy_on_change = False
# The ShowIf this statement was wrapped in the last time it was wrapped.
self.old_showif = None
class SLDisplayable(SLBlock):
"""
A screen language AST node that corresponds to a displayable being
@@ -520,7 +528,13 @@ class SLDisplayable(SLBlock):
i._scope(context.scope, True)
else:
context.children.append(cache.constant)
d = cache.constant
if context.showif is not None:
d = self.wrap_in_showif(d, context, cache)
context.children.append(d)
return
# Create the context.
@@ -648,6 +662,8 @@ class SLDisplayable(SLBlock):
fail = True
ctx.children = [ ]
ctx.showif = None
stack = renpy.ui.stack
stack.append(ctx)
@@ -721,9 +737,14 @@ class SLDisplayable(SLBlock):
for i in ctx.children:
main.add(i)
# Migrate grabs.
if old_main and (renpy.display.focus.grab is old_main):
renpy.display.focus.new_grab = main
# Inform the focus system about replacement displayables.
if (not context.predicting) and (old_d is not None):
replaced_by = renpy.display.focus.replaced_by
replaced_by[id(old_d)] = d
if d is not main:
for old_part, new_part in zip(old_d._composite_parts, d._composite_parts):
replaced_by[id(old_part)] = new_part
cache.displayable = d
cache.children = ctx.children
@@ -760,8 +781,6 @@ class SLDisplayable(SLBlock):
cache.transform = None
cache.raw_transform = None
context.children.append(d)
if self.constant:
cache.constant = d
@@ -771,6 +790,24 @@ class SLDisplayable(SLBlock):
if context.uses_scope is None:
cache.constant_uses_scope = ctx.uses_scope
if context.showif is not None:
d = self.wrap_in_showif(d, context, cache)
context.children.append(d)
def wrap_in_showif(self, d, context, cache):
"""
Wraps `d` in a ShowIf displayable.
"""
rv = renpy.sl2.sldisplayables.ShowIf(context.showif, cache.old_showif)
rv.add(d)
if not context.predicting:
cache.old_showif = rv
return rv
def report_arguments(self, cache, positional, keywords, transform):
if positional:
report = [ ]
@@ -950,7 +987,7 @@ class SLIf(SLNode):
for i in block.children:
try:
i.execute(context)
i.execute(ctx)
except:
pass
@@ -966,7 +1003,72 @@ class SLIf(SLNode):
return
def copy_on_change(self, cache):
for _cont, block in self.entries:
for _cond, block in self.entries:
block.copy_on_change(cache)
class SLShowIf(SLNode):
"""
The AST node that corresponds to the showif statement.
"""
def __init__(self, loc):
"""
An AST node that represents an if statement.
"""
SLNode.__init__(self, loc)
# A list of entries, with each consisting of an expression (or
# None, for the else block) and a SLBlock.
self.entries = [ ]
def analyze(self, analysis):
for _cond, block in self.entries:
block.analyze(analysis)
def prepare(self, analysis):
# A list of prepared entries, with each consisting of expression
# bytecode and a SLBlock.
self.prepared_entries = [ ]
for cond, block in self.entries:
if cond is not None:
node = py_compile(cond, 'eval', ast_node=True)
self.constant = min(self.constant, analysis.is_constant(node))
cond = compile_expr(node)
block.prepare(analysis)
self.constant = min(self.constant, block.constant)
self.prepared_entries.append((cond, block))
self.last_keyword = True
def execute(self, context):
first_true = True
for cond, block in self.prepared_entries:
ctx = SLContext(context)
if not first_true:
ctx.showif = False
else:
if cond is None or eval(cond, context.globals, context.scope):
ctx.showif = True
first_true = False
else:
ctx.showif = False
for i in block.children:
i.execute(ctx)
def copy_on_change(self, cache):
for _cond, block in self.entries:
block.copy_on_change(cache)
+70 -1
View File
@@ -25,6 +25,74 @@
import renpy.display
import renpy.text.text
class ShowIf(renpy.display.layout.Container):
"""
This is a displayable that wraps displayables that are
underneath a showif statement.
"""
def __init__(self, condition, replaces=None):
super(ShowIf, self).__init__()
self.condition = condition
if replaces is None:
if condition:
self.pending_event = "appear"
else:
self.pending_event = None
self.show_child = condition
else:
if self.condition and not replaces.condition:
self.pending_event = "show"
elif not self.condition and replaces.condition:
self.pending_event = "hide"
else:
self.pending_event = replaces.pending_event
self.show_child = replaces.show_child
def per_interact(self):
if self.pending_event:
self.child.set_transform_event(self.pending_event)
self.pending_event = None
def render(self, width, height, st, at):
if isinstance(self.child, renpy.display.motion.Transform):
if self.condition or self.show_child:
cr = renpy.display.render.render(self.child, width, height, st, at)
self.show_child = self.condition or not self.child.hide_response
else:
if self.condition:
cr = renpy.display.render.render(self.child, width, height, st, at)
self.show_child = True
else:
self.show_child = False
if self.show_child:
cw, ch = cr.get_size()
rv = renpy.display.render.Render(cw, ch)
rv.blit(cr, (0, 0))
else:
rv = renpy.display.render.Render(0, 0)
self.offsets = [ (0, 0) ]
return rv
def event(self, ev, x, y, st):
if self.condition:
return self.child.event(ev, x, y, st)
else:
return None
def get_placement(self):
return self.child.get_placement()
from renpy.sl2.slparser import Positional, Keyword, Style, PrefixStyle, add
from renpy.sl2.slparser import DisplayableParser, many
@@ -396,6 +464,7 @@ def sl2viewport(**kwargs):
rv = d.child
rv._main = vp
rv._composite_parts = list(rv.children)
return rv
@@ -506,6 +575,6 @@ Style("focus_mask")
add(ui_properties)
add(position_properties)
DisplayableParser("on", renpy.display.behavior.OnEvent, 0)
DisplayableParser("on", renpy.display.behavior.OnEvent, None, 0)
Positional("event")
Keyword("action")
+29 -6
View File
@@ -426,19 +426,40 @@ class DisplayableParser(Parser):
class IfParser(Parser):
def __init__(self, name):
def __init__(self, name, node_type, parent_contents):
"""
`node_type`
The type of node to create.
`parent_contents`
If true, our children must be children of our parent. Otherwise,
our children must be children of ourself.
"""
super(IfParser, self).__init__(name)
self.node_type = node_type
self.parent_contents = parent_contents
if not parent_contents:
childbearing_statements.add(self)
def parse(self, loc, l, parent):
rv = slast.SLIf(loc)
if self.parent_contents:
contents_from = parent
else:
contents_from = self
rv = self.node_type(loc)
condition = l.require(l.python_expression)
l.require(':')
block = slast.SLBlock(loc)
parent.parse_contents(l, block, block_only=True)
contents_from.parse_contents(l, block, block_only=True)
rv.entries.append((condition, block))
@@ -454,7 +475,7 @@ class IfParser(Parser):
l.require(':')
block = slast.SLBlock(loc)
parent.parse_contents(l, block, block_only=True)
contents_from.parse_contents(l, block, block_only=True)
rv.entries.append((condition, block))
@@ -466,7 +487,7 @@ class IfParser(Parser):
l.require(':')
block = slast.SLBlock(loc)
parent.parse_contents(l, block, block_only=True)
contents_from.parse_contents(l, block, block_only=True)
rv.entries.append((condition, block))
@@ -480,7 +501,9 @@ class IfParser(Parser):
return rv
if_statement = IfParser("if")
if_statement = IfParser("if", slast.SLIf, True)
IfParser("showif", slast.SLShowIf, False)
class ForParser(Parser):
+4 -1
View File
@@ -20,7 +20,10 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from pygame cimport *
from sdl2 cimport *
from pygame_sdl2 cimport *
import_pygame_sdl2__surface()
from freetype cimport *
from ttgsubtable cimport *
from textsupport cimport Glyph, SPLIT_INSTEAD
+28 -25
View File
@@ -400,9 +400,9 @@ class Wrapper(renpy.object.Object):
if not stack:
raise Exception("Can't add displayable during init phase.")
# Pull out the special kwargs, id, at, and style_group.
# Pull out the special kwargs, widget_id, at, and style_group.
id = kwargs.pop("id", None) #@ReservedAssignment
widget_id = kwargs.pop("id", None) #@ReservedAssignment
at_list = kwargs.pop("at", [ ])
if not isinstance(at_list, (list, tuple)):
@@ -428,24 +428,19 @@ class Wrapper(renpy.object.Object):
do_add = True
if screen:
if id in screen.widget_properties:
keyword.update(screen.widget_properties[id])
if widget_id in screen.widget_properties:
keyword.update(screen.widget_properties[widget_id])
if id in screen.hidden_widgets:
if widget_id in screen.hidden_widgets:
do_add = False
grab = False
if old_transfers:
if self.replaces:
w = screen.old_widgets.get(id, None)
if w is not None:
keyword["replaces"] = w
if (renpy.display.focus.grab is w) and (not screen.hiding):
grab = True
old_main = screen.old_widgets.get(widget_id, None)
if self.replaces and old_main is not None:
keyword["replaces"] = old_main
else:
old_main = None
if self.style and "style" not in keyword:
keyword["style"] = style_group_style(self.style, style_group)
@@ -461,12 +456,15 @@ class Wrapper(renpy.object.Object):
del tb # Important! Prevents memory leaks via our frame.
raise
main = w._main or w
# Migrate the focus.
if (old_main is not None) and (not screen.hiding):
renpy.display.focus.replaced_by[id(old_main)] = main
# Wrap the displayable based on the at_list and at_stack.
atw = w
if grab:
renpy.display.focus.new_grab = w
while at_stack:
at_list.append(at_stack.pop())
@@ -486,18 +484,16 @@ class Wrapper(renpy.object.Object):
elif self.many:
stack.append(Many(w, self.imagemap, style_group))
main = w._main or w
# If we have an id, record the displayable, the transform,
# If we have an widget_id, record the displayable, the transform,
# and maybe take the state from a previous transform.
if screen and id is not None:
screen.widgets[id] = main
if screen and widget_id is not None:
screen.widgets[widget_id] = main
if isinstance(atw, renpy.display.motion.Transform):
screen.transforms[id] = atw
screen.transforms[widget_id] = atw
if old_transfers:
oldt = screen.old_transforms.get(id, None)
oldt = screen.old_transforms.get(widget_id, None)
else:
oldt = None
@@ -917,6 +913,7 @@ def _textbutton(label, clicked=None, style=None, text_style=None, substitute=Tru
text = renpy.text.text.Text(label, style=text_style, substitute=substitute, scope=scope, **text_kwargs)
rv.add(text)
rv._main = text
rv._composite_parts = [ text ]
return rv
textbutton = Wrapper(_textbutton)
@@ -942,6 +939,7 @@ def _label(label, style=None, text_style=None, substitute=True, scope=None, **kw
text = renpy.text.text.Text(label, style=text_style, substitute=substitute, scope=scope, **text_kwargs)
rv.add(text)
rv._main = text
rv._composite_parts = [ text ]
return rv
label = Wrapper(_label)
@@ -1145,13 +1143,18 @@ def _imagemap(ground=None, hover=None, insensitive=None, idle=None, selected_hov
properties.setdefault('fit_first', True)
rv = renpy.display.layout.MultiBox(layout='fixed', **properties)
parts = [ ]
if ground:
rv.add(renpy.easy.displayable(ground))
parts.append(ground)
box = renpy.display.layout.MultiBox(layout='fixed')
rv.add(box)
parts.append(box)
rv._main = box
rv._composite_parts = parts
return rv
+8 -2
View File
@@ -403,10 +403,11 @@ On Statement
------------
The On statement is a complex statement that defines an event handler. On
statements are greedily grouped into a single statement.
statements are greedily grouped into a single statement. On statement can
handle a single event name, or a comma-separated list of event names.
.. productionlist:: atl
atl_on : "on" `name` ":"
atl_on : "on" `name` [ "," `name` ] * ":"
: `atl_block`
The on statement is used to handle events. When an event is handled, handling
@@ -426,6 +427,11 @@ by the time statement, or an enclosing event handler.)
on hide:
linear .5 alpha 0.0
transform pulse_button:
on hover, idle:
linear .25 zoom 1.25
linear .25 zoom 1.0
Contains Statement
------------------
+50 -1
View File
@@ -2,6 +2,50 @@
Full Changelog
==============
Ren'Py 6.18.3
=============
This release adds the :ref:`showif statement <sl-showif>` to screen language.
The showif statement shows and hides its children based on a condition. When
its children are ATL transforms, showif delivers ATL events to manage the
show and hide process.
Ren'Py's image prediction mechanism now models the return stack, and can
predict images through a call and return pair. Previously, a call followed
by a return would block image prediction.
Ren'Py now predicts that the start label will be called from the main menu.
This will help to avoid unpredicted image loads at the very start of a game.
The ATL on statement now can take a comma-separated list of event names.
The new :func:`updater.UpdateVersion` function contacts an update server and
determines if an update is available.
The new :func:`renpy.invoke_in_thread` function runs a function in a background
thread, and restarts the interaction when that thread finishes.
While in self-voicing mode, the {w} and {p} tags are ignored.
The Traditional Chinese and Russian translations have been updated.
Bug Fixes
---------
Fixed a regression that could cause hiding transforms to skip time.
Fixed a bug that would cause the screen language if statement to show
children from blocks with a false condition, if those child blocks were
run during prediction.
Fixed an issue where SetScreenVariable and ToggleScreenVariable were
declared as pure functions, but weren't. They now have been reimplemented
as pure functions.
Fixed an issue where a grab could fail to transfer between interactions,
leaving Ren'Py unresponsive.
Ren'Py 6.18.2
=============
@@ -41,11 +85,16 @@ Ren'Py itself. These functions are :func:`renpy.profile_memory` and
lets one more specifically see the memory consumption of the internal
rollback log.
When self-voicing mode is enabled, Ren'Py displays a notification that
explains how to disable self-voicing mode.
This release fixes a subtle bug caused by incorrect analysis of for
loops in screen language screens, when the iteration variable is a
constant. (For example, when the iteration variable is ``define``ed
constant. (For example, when the iteration variable is ``define``\ed
somewhere else in the game.)
This release adds Traditional Chinese translations of the launcher and
template game, contributed by Civalin.
Ren'Py 6.18.1
=============
+4
View File
@@ -229,6 +229,10 @@ To stop applying transforms to the layer, use::
show layer master
Transforms used with show should not may any assumptions about their starting
state. Currently, transforms used with show layer do not take their state from
prior layer transforms, but we plan to change this in the future.
.. _scene-statement:
Scene Statement
+9
View File
@@ -180,6 +180,15 @@
Iconifies the game.
.. function:: renpy.invoke_in_thread(fn, *args, **kwargs)
Invokes the function `fn` in a background thread, passing it the
provided arguments and keyword arguments. Restarts the interaction
once the thread returns.
This function creates a daemon thread, which will be automatically
stopped when Ren'Py is shutting down.
.. function:: renpy.is_seen(ever=True)
Returns true if the current line has been seen by the player.
-2
View File
@@ -220,7 +220,6 @@
* :var:`offscreenright`
* persistent
* :var:`pixellate`
* predict
* predict_menu
* predict_say
* python_dict
@@ -232,7 +231,6 @@
* :var:`right`
* :var:`save_name`
* :var:`say`
* skip_indicator
* slideawaydown
* :var:`slideawayleft`
* slideawayright
+24
View File
@@ -5,11 +5,35 @@
An action that calls :func:`updater.update`. All arguments are
stored and passed to that function.
.. function:: updater.UpdateVersion(url, check_interval=21600, simulate=None, **kwargs)
This function contacts the server at `url`, and determines if there is
a newer version of software available at that url. If there is, this
function returns the new version. Otherwise, it returns None.
Since contacting the server can take some time, this function launches
a thread in the background, and immediately returns the version from
the last time the server was contacted, or None if the server has never
been contacted. The background thread will restart the current interaction
once the server has been contacted, which will cause screens that call
this function to update.
Each url will be contacted at most once per Ren'Py session, and not
more than once every `check_interval` seconds. When the server is not
contacted, cached data will be returned.
Additional keyword arguments (including `simulate`) are passed to the
update mechanism as if they were given to :func:`updater.update`.
.. function:: updater.can_update(base=None)
Returns true if it's possible that an update can succeed. Returns false
if updating is totally impossible. (For example, if the update directory
was deleted.)
Note that this does not determine if an update is actually available.
To do that, use :func:`updater.UpdateVersion`.
.. function:: updater.get_installed_packages(base=None)
+67
View File
@@ -1462,6 +1462,73 @@ has side effects, those side effects may occur at unpredictable times.
textbutton "Run Test" action Jump(test_label)
.. _sl-showif:
Showif Statement
================
The showif statement takes a condition. It shows its children when the
condition is true, and hides the children when the condition is false.
When showif's children have transforms, it will supply them with ATL
events to manage the show and hide process, so that Ren'Py can animate
the show and hide process.
Multiple showif statements can be grouped together into a single
showif/elif/else construct, similiar to an if statement.
**Unlike the if statement, showif executes all of its blocks, including python code, even if the condition is false.**
This is because the showif statement needs to create the children that it is
hiding.
Showif delivers three events to its children:
``appear``
Is delivered if the condition is true when the screen is first shown,
to instantly show the child.
``show``
Is delivered when the condition changes from false to true.
``hide``
Is delivered when the condition changes from true to false.
For these purposes, the condition of an elif clause is always false if any
prior condition is true, while the condition of an else clause is only true
when all prior conditions are false.
For example::
transform cd_transform:
# This is run before appear, show, or hide.
xalign 0.5 yalign 0.5 alpha 0.0
on appear:
alpha 1.0
on show:
zoom .75
linear .25 zoom 1.0 alpha 1.0
on hide:
linear .25 zoom 1.25 alpha 0.0
screen countdown():
default n = 3
vbox:
textbutton "3" action SetScreenVariable("n", 3)
textbutton "2" action SetScreenVariable("n", 2)
textbutton "1" action SetScreenVariable("n", 1)
textbutton "0" action SetScreenVariable("n", 0)
showif n == 3:
text "Three" size 100 at cd_transform
elif n == 2:
text "Two" size 100 at cd_transform
elif n == 1:
text "One" size 100 at cd_transform
else:
text "Liftoff!" size 100 at cd_transform
label start:
call screen countdown
Screen Statements
=================
@@ -460,3 +460,7 @@ translate None strings:
old "Location"
new "Ubicación"
# renpy/common/00preferences.rpy:373
old "Self-voicing enabled. Press 'v' to disable."
new "Self-voicing activado. Presiona 'v' para desactivarlo."
+124
View File
@@ -0,0 +1,124 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>README</title><style>
BODY {
background: #fff;
color: #444;
padding-left: 20%;
padding-top: 1em;
padding-bottom: 1em;
padding-right: 20%;
font-family: sans-serif;
line-height: 1.6em;
}
DT {
font-weight: bold;
margin-top: .33em;
}
H2 {
color: #000;
margin-left: -2.5em;
}
H3 {
color: #000;
margin-left: -1.5em;
}
.editsection {
display: none;
}
</style></head>
<body>
<div id="renpy_help"></div>
<p><a name="Basic_Help" id="Basic_Help"></a></p>
<h2><span class="editsection">[<a href="/w/index.php?title=renpy/Help&amp;action=edit&amp;section=1" title="Edit section: Basic Help">edit</a>]</span>&nbsp;<span class="mw-headline">基本説明</span></h2>
<p>若要開始進行遊戲,點擊滑鼠左鍵或按空白鍵與換行鍵。遇到選項或選單,點擊滑鼠左鍵來選擇,或者使用方向鍵來選擇選項並按換行鍵來確定。</p>
<p><a name="Game_Menu" id="Game_Menu"></a></p>
<h3><span class="editsection">[<a href="/w/index.php?title=renpy/Help&amp;action=edit&amp;section=2" title="Edit section: Game Menu">edit</a>]</span> <span class="mw-headline">遊戲選單</span></h3>
<p>當進行遊戲時,用滑鼠右擊或按下 Esc 鍵進入遊戲選單。遊戲選單給出以下選項:</p>
<dl>
<dt>返回</dt>
<dd>返回遊戲。</dd>
<dt>儲存遊戲</dt>
<dd>允許您通過點擊來保存遊戲到指定的遊戲檔位中。</dd>
<dt>載入</dt>
<dd>允許您通過點擊來載入指定檔位的遊戲檔案。點擊「自動」將訪問自動存儲的檔位。</dd>
<dt>設定<br></dt>
<dd>改變遊戲的偏好(選項/配置): <dl>
<dt>顯示</dt>
<dd>全屏模式和視窗模式之間切換。</dd>
<dt>過渡</dt>
<dd>控制顯示遊戲螢幕之間的轉換。</dd>
<dt>文字顯示速度<br></dt>
<dd>控制文字顯示的速率。進一步向右滑動此滑塊,文字將更快的顯示。當滑動到最右邊時文字將即時顯示。</dd>
<dt>遊戲桿</dt>
<dd>讓您使用遊戲桿來進行遊戲。</dd>
<dt>略過<dt>
<dd>在選擇略過已讀訊息(遊戲中經歷的所有)和略過所有訊息之間作選擇。</dd>
<dt>開始略過<br></dt>
<dd>返回遊戲,並開始略過模式。</dd>
<dt>選擇後<br></dt>
<dd>控制略過模式遇到選單是否停止。<br></dd>
<dt>自動前行時間<br></dt>
<dd>控制自動化選項,再向左邊表示自動等待的時間越短。當滑動到最右邊時文字將不會自動前行。</dd>
<dt>音樂、音效、聲音音量</dt>
<dd>控制音樂、音效和聲音音量。當滑動到最右邊表示最大音量。</dd>
</dl>
</dd>
</dl>
<dl>
<dt>標題畫面<br></dt>
<dd>返回標題畫面,並結束當前遊戲。</dd>
<dt>説明</dt>
<dd>顯示此説明至螢幕。</dd>
<dt>離開</dt>
<dd>離開遊戲,遊戲將結束並關閉。</dd>
</dl>
<p><a name="Key_and_Mouse_Bindings" id="Key_and_Mouse_Bindings"></a></p>
<h3><span class="editsection">[<a href="/w/index.php?title=renpy/Help&amp;action=edit&amp;section=3" title="Edit section: Key and Mouse Bindings">edit</a>]</span> <span class="mw-headline">鍵盤和滑鼠綁定</span></h3>
<dl>
<dt>左擊,換行鍵</dt>
<dd>繼續遊戲,確定選項按鈕和滑動塊。</dd>
<dt>空白鍵</dt>
<dd>繼續遊戲,但不會確認選項。</dd><dd><br></dd>
<dt>方向鍵</dt>
<dd>選擇選項,按鈕和滑動塊。</dd>
<dt>Ctrl</dt>
<dd>按住快速略過模式。</dd>
<dt>Tab</dt>
<dd>切換略過模式,再次按下前會維持。</dd>
<dt>滑鼠滾輪向上、PageUp</dt>
<dd>產生回溯。回滾到遊戲之前的對話選項等。</dd>
<dt>滑鼠滾輪向下、PageDown</dt>
<dd>產生反回溯。取消前一次回滾。</dd>
<dt>右擊、Esc</dt>
<dd>進入遊戲選單,當在遊戲選單中則返回遊戲。</dd>
<dt>滑鼠中鍵、H<br></dt>
<dd>隱藏文字視窗和其他暫時顯示的內容。</dd>
<dt>F</dt>
<dd>切換全螢幕模式。<br></dd>
<dt>S</dt>
<dd>產生截圖,保存類型為 screenshootxxxx.png ,其中 xxxx 表示一組數位串。</dd>
<dt>Alt-M, Command-M</dt>
<dd>最小化視窗到工作列。</dd>
<dt>Alt-F4, Command-Q</dt>
<dd>離開遊戲。</dd>
<dt>Delete</dt>
<dd>當選定一個檔位時,則刪除該存檔。</dd>
</dl>
<p><a name="Legal_Notice" id="Legal_Notice"></a></p>
<h2><span class="editsection">[<a href="/w/index.php?title=renpy/Help&amp;action=edit&amp;section=4" title="Edit section: Legal Notice">edit</a>]</span> <span class="mw-headline">法律公告</span></h2>
<p>本遊戲使用了各種開源專案的原始程式碼。如果您需要獲取原始碼和清單,請參閲 Ren'py 目錄中的 LICENSE.txt 檔案,或者訪問 <a href="http://www.renpy.org/wiki/renpy/License" class="external free" title="http://www.renpy.org/wiki/renpy/License" rel="nofollow">http://www.renpy.org/wiki/renpy/License</a></p>
</body></html>
@@ -0,0 +1,287 @@
## This file contains some of the options that can be changed to customize
## your Ren'Py game. It only contains the most common options... there
## is quite a bit more customization you can do.
##
## Lines beginning with two '#' marks are comments, and you shouldn't
## uncomment them. Lines beginning with a single '#' mark are
## commented-out code, and you may want to uncomment them when
## appropriate.
init -1 python hide:
## Should we enable the use of developer tools? This should be
## set to False before the game is released, so the user can't
## cheat using developer tools.
config.developer = True
## These control the width and height of the screen.
config.screen_width = 800
config.screen_height = 600
## This controls the title of the window, when Ren'Py is
## running in a window.
config.window_title = u"PROJECT_NAME"
# These control the name and version of the game, that are reported
# with tracebacks and other debugging logs.
config.name = "PROJECT_NAME"
config.version = "0.0"
#########################################
# Themes
## We then want to call a theme function. theme.roundrect is
## a theme that features the use of rounded rectangles.
##
## The theme function takes a number of parameters that can
## customize the color scheme.
theme.roundrect(
## The color of an idle widget face.
widget = "#003c78",
## The color of a focused widget face.
widget_hover = "#0050a0",
## The color of the text in a widget.
widget_text = "#c8ffff",
## The color of the text in a selected widget. (For
## example, the current value of a preference.)
widget_selected = "#ffffc8",
## The color of a disabled widget face.
disabled = "#404040",
## The color of disabled widget text.
disabled_text = "#c8c8c8",
## The color of informational labels.
label = "#ffffff",
## The color of a frame containing widgets.
frame = "#6496c8",
## If this is True, the in-game window is rounded. If False,
## the in-game window is square.
rounded_window = False,
## The background of the main menu. This can be a color
## beginning with '#', or an image filename. The latter
## should take up the full height and width of the screen.
mm_root = "#dcebff",
## The background of the game menu. This can be a color
## beginning with '#', or an image filename. The latter
## should take up the full height and width of the screen.
gm_root = "#dcebff",
## And we're done with the theme. The theme will customize
## various styles, so if we want to change them, we should
## do so below.
)
#########################################
## These settings let you customize the window containing the
## dialogue and narration, by replacing it with an image.
## The background of the window. In a Frame, the two numbers
## are the size of the left/right and top/bottom borders,
## respectively.
# style.window.background = Frame("frame.png", 12, 12)
## Margin is space surrounding the window, where the background
## is not drawn.
# style.window.left_margin = 6
# style.window.right_margin = 6
# style.window.top_margin = 6
# style.window.bottom_margin = 6
## Padding is space inside the window, where the background is
## drawn.
# style.window.left_padding = 6
# style.window.right_padding = 6
# style.window.top_padding = 6
# style.window.bottom_padding = 6
## This is the minimum height of the window, including the margins
## and padding.
# style.window.yminimum = 250
#########################################
## This lets you change the placement of the main menu.
## The way placement works is that we find an anchor point
## inside a displayable, and a position (pos) point on the
## screen. We then place the displayable so the two points are
## at the same place.
## An anchor/pos can be given as an integer or a floating point
## number. If an integer, the number is interpreted as a number
## of pixels from the upper-left corner. If a floating point,
## the number is interpreted as a fraction of the size of the
## displayable or screen.
# style.mm_menu_frame.xpos = 0.5
# style.mm_menu_frame.xanchor = 0.5
# style.mm_menu_frame.ypos = 0.75
# style.mm_menu_frame.yanchor = 0.5
#########################################
## These let you customize the default font used for text in Ren'Py.
## The file containing the default font.
style.default.font = "tl/None/DroidSansFallback.ttf"
style._default.font = "tl/None/DroidSansFallback.ttf"
## The default size of text.
# style.default.size = 22
## Note that these only change the size of some of the text. Other
## buttons have their own styles.
#########################################
## These settings let you change some of the sounds that are used by
## Ren'Py.
## Set this to False if the game does not have any sound effects.
config.has_sound = True
## Set this to False if the game does not have any music.
config.has_music = True
## Set this to True if the game has voicing.
config.has_voice = False
## Sounds that are used when button and imagemaps are clicked.
# style.button.activate_sound = "click.wav"
# style.imagemap.activate_sound = "click.wav"
## Sounds that are used when entering and exiting the game menu.
# config.enter_sound = "click.wav"
# config.exit_sound = "click.wav"
## A sample sound that can be played to check the sound volume.
# config.sample_sound = "click.wav"
## Music that is played while the user is at the main menu.
# config.main_menu_music = "main_menu_theme.ogg"
#########################################
## Help.
## This lets you configure the help option on the Ren'Py menus.
## It may be:
## - A label in the script, in which case that label is called to
## show help to the user.
## - A file name relative to the base directory, which is opened in a
## web browser.
## - None, to disable help.
config.help = "README.html"
#########################################
## Transitions.
## Used when entering the game menu from the game.
config.enter_transition = None
## Used when exiting the game menu to the game.
config.exit_transition = None
## Used between screens of the game menu.
config.intra_transition = None
## Used when entering the game menu from the main menu.
config.main_game_transition = None
## Used when returning to the main menu from the game.
config.game_main_transition = None
## Used when entering the main menu from the splashscreen.
config.end_splash_transition = None
## Used when entering the main menu after the game has ended.
config.end_game_transition = None
## Used when a game is loaded.
config.after_load_transition = None
## Used when the window is shown.
config.window_show_transition = None
## Used when the window is hidden.
config.window_hide_transition = None
## Used when showing NVL-mode text directly after ADV-mode text.
config.adv_nvl_transition = dissolve
## Used when showing ADV-mode text directly after NVL-mode text.
config.nvl_adv_transition = dissolve
## Used when yesno is shown.
config.enter_yesno_transition = None
## Used when the yesno is hidden.
config.exit_yesno_transition = None
## Used when entering a replay
config.enter_replay_transition = None
## Used when exiting a replay
config.exit_replay_transition = None
## Used when the image is changed by a say statement with image attributes.
config.say_attribute_transition = None
#########################################
## This is the name of the directory where the game's data is
## stored. (It needs to be set early, before any other init code
## is run, so the persistent information can be found by the init code.)
python early:
config.save_directory = "PROJECT_NAME-UNIQUE"
init -1 python hide:
#########################################
## Default values of Preferences.
## Note: These options are only evaluated the first time a
## game is run. To have them run a second time, delete
## game/saves/persistent
## Should we start in fullscreen mode?
config.default_fullscreen = False
## The default text speed in characters per second. 0 is infinite.
config.default_text_cps = 0
## The default auto-forward time setting.
config.default_afm_time = 10
#########################################
## More customizations can go here.
@@ -0,0 +1,561 @@
# This file is in the public domain. Feel free to modify it as a basis
# for your own screens.
##############################################################################
# Say
#
# Screen that's used to display adv-mode dialogue.
# http://www.renpy.org/doc/html/screen_special.html#say
screen say:
# Defaults for side_image and two_window
default side_image = None
default two_window = False
# Decide if we want to use the one-window or two-window variant.
if not two_window:
# The one window variant.
window:
id "window"
has vbox:
style "say_vbox"
if who:
text who id "who"
text what id "what"
else:
# The two window variant.
vbox:
style "say_two_window_vbox"
if who:
window:
style "say_who_window"
text who:
id "who"
window:
id "window"
has vbox:
style "say_vbox"
text what id "what"
# If there's a side image, display it above the text.
if side_image:
add side_image
else:
add SideImage() xalign 0.0 yalign 1.0
# Use the quick menu.
use quick_menu
##############################################################################
# Choice
#
# Screen that's used to display in-game menus.
# http://www.renpy.org/doc/html/screen_special.html#choice
screen choice:
window:
style "menu_window"
xalign 0.5
yalign 0.5
vbox:
style "menu"
spacing 2
for caption, action, chosen in items:
if action:
button:
action action
style "menu_choice_button"
text caption style "menu_choice"
else:
text caption style "menu_caption"
init -2:
$ config.narrator_menu = True
style menu_window is default
style menu_choice is button_text:
clear
style menu_choice_button is button:
xminimum int(config.screen_width * 0.75)
xmaximum int(config.screen_width * 0.75)
##############################################################################
# Input
#
# Screen that's used to display renpy.input()
# http://www.renpy.org/doc/html/screen_special.html#input
screen input:
window style "input_window":
has vbox
text prompt style "input_prompt"
input id "input" style "input_text"
use quick_menu
##############################################################################
# Nvl
#
# Screen used for nvl-mode dialogue and menus.
# http://www.renpy.org/doc/html/screen_special.html#nvl
screen nvl:
window:
style "nvl_window"
has vbox:
style "nvl_vbox"
# Display dialogue.
for who, what, who_id, what_id, window_id in dialogue:
window:
id window_id
has hbox:
spacing 10
if who is not None:
text who id who_id
text what id what_id
# Display a menu, if given.
if items:
vbox:
id "menu"
for caption, action, chosen in items:
if action:
button:
style "nvl_menu_choice_button"
action action
text caption style "nvl_menu_choice"
else:
text caption style "nvl_dialogue"
add SideImage() xalign 0.0 yalign 1.0
use quick_menu
##############################################################################
# Main Menu
#
# Screen that's used to display the main menu, when Ren'Py first starts
# http://www.renpy.org/doc/html/screen_special.html#main-menu
screen main_menu:
# This ensures that any other menu screen is replaced.
tag menu
# The background of the main menu.
window:
style "mm_root"
# The main menu buttons.
frame:
style_group "mm"
xalign .98
yalign .98
has vbox
textbutton _("Start Game") action Start()
textbutton _("Load Game") action ShowMenu("load")
textbutton _("Preferences") action ShowMenu("preferences")
textbutton _("Help") action Help()
textbutton _("Quit") action Quit(confirm=False)
init -2:
# Make all the main menu buttons be the same size.
style mm_button:
size_group "mm"
##############################################################################
# Navigation
#
# Screen that's included in other screens to display the game menu
# navigation and background.
# http://www.renpy.org/doc/html/screen_special.html#navigation
screen navigation:
# The background of the game menu.
window:
style "gm_root"
# The various buttons.
frame:
style_group "gm_nav"
xalign .98
yalign .98
has vbox
textbutton _("Return") action Return()
textbutton _("Preferences") action ShowMenu("preferences")
textbutton _("Save Game") action ShowMenu("save")
textbutton _("Load Game") action ShowMenu("load")
textbutton _("Main Menu") action MainMenu()
textbutton _("Help") action Help()
textbutton _("Quit") action Quit()
init -2:
# Make all game menu navigation buttons the same size.
style gm_nav_button:
size_group "gm_nav"
##############################################################################
# Save, Load
#
# Screens that allow the user to save and load the game.
# http://www.renpy.org/doc/html/screen_special.html#save
# http://www.renpy.org/doc/html/screen_special.html#load
# Since saving and loading are so similar, we combine them into
# a single screen, file_picker. We then use the file_picker screen
# from simple load and save screens.
screen file_picker:
frame:
style "file_picker_frame"
has vbox
# The buttons at the top allow the user to pick a
# page of files.
hbox:
style_group "file_picker_nav"
textbutton _("Previous"):
action FilePagePrevious()
textbutton _("Auto"):
action FilePage("auto")
textbutton _("Quick"):
action FilePage("quick")
for i in range(1, 9):
textbutton str(i):
action FilePage(i)
textbutton _("Next"):
action FilePageNext()
$ columns = 2
$ rows = 5
# Display a grid of file slots.
grid columns rows:
transpose True
xfill True
style_group "file_picker"
# Display ten file slots, numbered 1 - 10.
for i in range(1, columns * rows + 1):
# Each file slot is a button.
button:
action FileAction(i)
xfill True
has hbox
# Add the screenshot.
add FileScreenshot(i)
$ file_name = FileSlotName(i, columns * rows)
$ file_time = FileTime(i, empty=_("Empty Slot."))
$ save_name = FileSaveName(i)
text "[file_name]. [file_time!t]\n[save_name!t]"
key "save_delete" action FileDelete(i)
screen save:
# This ensures that any other menu screen is replaced.
tag menu
use navigation
use file_picker
screen load:
# This ensures that any other menu screen is replaced.
tag menu
use navigation
use file_picker
init -2:
style file_picker_frame is menu_frame
style file_picker_nav_button is small_button
style file_picker_nav_button_text is small_button_text
style file_picker_button is large_button
style file_picker_text is large_button_text
##############################################################################
# Preferences
#
# Screen that allows the user to change the preferences.
# http://www.renpy.org/doc/html/screen_special.html#prefereces
screen preferences:
tag menu
# Include the navigation.
use navigation
# Put the navigation columns in a three-wide grid.
grid 3 1:
style_group "prefs"
xfill True
# The left column.
vbox:
frame:
style_group "pref"
has vbox
label _("Display")
textbutton _("Window") action Preference("display", "window")
textbutton _("Fullscreen") action Preference("display", "fullscreen")
frame:
style_group "pref"
has vbox
label _("Transitions")
textbutton _("All") action Preference("transitions", "all")
textbutton _("None") action Preference("transitions", "none")
frame:
style_group "pref"
has vbox
label _("Text Speed")
bar value Preference("text speed")
frame:
style_group "pref"
has vbox
textbutton _("Joystick...") action Preference("joystick")
vbox:
frame:
style_group "pref"
has vbox
label _("Skip")
textbutton _("Seen Messages") action Preference("skip", "seen")
textbutton _("All Messages") action Preference("skip", "all")
frame:
style_group "pref"
has vbox
textbutton _("Begin Skipping") action Skip()
frame:
style_group "pref"
has vbox
label _("After Choices")
textbutton _("Stop Skipping") action Preference("after choices", "stop")
textbutton _("Keep Skipping") action Preference("after choices", "skip")
frame:
style_group "pref"
has vbox
label _("Auto-Forward Time")
bar value Preference("auto-forward time")
if config.has_voice:
textbutton _("Wait for Voice") action Preference("wait for voice", "toggle")
vbox:
frame:
style_group "pref"
has vbox
label _("Music Volume")
bar value Preference("music volume")
frame:
style_group "pref"
has vbox
label _("Sound Volume")
bar value Preference("sound volume")
if config.sample_sound:
textbutton _("Test"):
action Play("sound", config.sample_sound)
style "soundtest_button"
if config.has_voice:
frame:
style_group "pref"
has vbox
label _("Voice Volume")
bar value Preference("voice volume")
textbutton _("Voice Sustain") action Preference("voice sustain", "toggle")
if config.sample_voice:
textbutton _("Test"):
action Play("voice", config.sample_voice)
style "soundtest_button"
init -2:
style pref_frame:
xfill True
xmargin 5
top_margin 5
style pref_vbox:
xfill True
style pref_button:
size_group "pref"
xalign 1.0
style pref_slider:
xmaximum 192
xalign 1.0
style soundtest_button:
xalign 1.0
##############################################################################
# Yes/No Prompt
#
# Screen that asks the user a yes or no question.
# http://www.renpy.org/doc/html/screen_special.html#yesno-prompt
screen yesno_prompt:
modal True
window:
style "gm_root"
frame:
style_group "yesno"
xfill True
xmargin .05
ypos .1
yanchor 0
ypadding .05
has vbox:
xalign .5
yalign .5
spacing 30
label _(message):
xalign 0.5
hbox:
xalign 0.5
spacing 100
textbutton _("Yes") action yes_action
textbutton _("No") action no_action
# Right-click and escape answer "no".
key "game_menu" action no_action
init -2:
style yesno_button:
size_group "yesno"
style yesno_label_text:
text_align 0.5
layout "subtitle"
##############################################################################
# Quick Menu
#
# A screen that's included by the default say screen, and adds quick access to
# several useful functions.
screen quick_menu:
# Add an in-game quick menu.
hbox:
style_group "quick"
xalign 1.0
yalign 1.0
textbutton _("Back") action Rollback()
textbutton _("Save") action ShowMenu('save')
textbutton _("Q.Save") action QuickSave()
textbutton _("Q.Load") action QuickLoad()
textbutton _("Skip") action Skip()
textbutton _("F.Skip") action Skip(fast=True, confirm=True)
textbutton _("Auto") action Preference("auto-forward", "toggle")
textbutton _("Prefs") action ShowMenu('preferences')
init -2:
style quick_button:
is default
background None
xpadding 5
style quick_button_text:
is default
size 12
idle_color "#8888"
hover_color "#ccc"
selected_idle_color "#cc08"
selected_hover_color "#cc0"
insensitive_color "#4448"
@@ -0,0 +1,17 @@
# You can place the script of your game in this file.
# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
# Declare characters used by this game.
define e = Character('Eileen', color="#c8ffc8")
# The game starts here.
label start:
e "You've created a new Ren'Py game."
e "Once you add a story, pictures, and music, you can release it to the world!"
return
@@ -0,0 +1,20 @@
DroidSansFallback.ttf is destributed under Apache License 2.0.
--------------------------------
Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
##########
This directory contains the fonts for the platform. They are licensed
under the Apache 2 license.
@@ -0,0 +1,476 @@

translate None strings:
# renpy/common/00action_file.rpy:118
old "%b %d, %H:%M"
new "%m月%d日, %H:%M"
translate None strings:
# renpy/common/00gltest.rpy:50
old "Graphics Acceleration"
new "圖形加速"
# renpy/common/00gltest.rpy:54
old "Automatically Choose"
new "自動選擇"
# renpy/common/00gltest.rpy:59
old "Force Angle/DirectX Renderer"
new "強制 Angle/DirectX 渲染"
# renpy/common/00gltest.rpy:63
old "Force OpenGL Renderer"
new "強制 OpenGL 渲染"
# renpy/common/00gltest.rpy:67
old "Force Software Renderer"
new "強制軟體渲染"
# renpy/common/00gltest.rpy:73
old "Changes will take effect the next time this program is run."
new "更改將會在下次啟動程式時生效。"
# renpy/common/00gltest.rpy:112
old "Performance Warning"
new "效能警告"
# renpy/common/00gltest.rpy:117
old "This computer is using software rendering."
new "該電腦正在使用軟體渲染。"
# renpy/common/00gltest.rpy:119
old "This computer is not using shaders."
new "該電腦沒有使用著色器"
# renpy/common/00gltest.rpy:121
old "This computer is displaying graphics slowly."
new "該電腦圖形顯示緩慢。"
# renpy/common/00gltest.rpy:123
old "This computer has a problem displaying graphics: [problem]."
new "該電腦圖形顯示出錯:[problem]。"
# renpy/common/00gltest.rpy:128
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display. Updating DirectX could fix this problem."
new "目前的圖形驅動程式版本可能過舊或者運作不正確。這樣會導致圖形顯示緩慢或者錯誤。升級 DirectX 可能會解決該問題。"
# renpy/common/00gltest.rpy:130
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display."
new "目前圖形驅動程式版本可能過舊或者運作不正確。這樣會導致圖形顯示緩慢或者錯誤。"
# renpy/common/00gltest.rpy:135
old "Update DirectX"
new "更新 DirectX"
# renpy/common/00gltest.rpy:141
old "Continue, Show this warning again"
new "繼續,下次再顯示該警告"
# renpy/common/00gltest.rpy:145
old "Continue, Don't show warning again"
new "繼續,不再顯示該警告"
# renpy/common/00gltest.rpy:171
old "Updating DirectX."
new "正在更新 DirectX。"
# renpy/common/00gltest.rpy:175
old "DirectX web setup has been started. It may start minimized in the taskbar. Please follow the prompts to install DirectX."
new "DirectX 線上安裝已啟動。將會最小化到狀態列中。請按照說明安裝 DirectX。"
# renpy/common/00gltest.rpy:179
old "{b}Note:{/b} Microsoft's DirectX web setup program will, by default, install the Bing toolbar. If you do not want this toolbar, uncheck the appropriate box."
new "{b}警告:{/b} Microsoft's DirectX 線上安裝程式會預設安裝 Bing 瀏覽器工具列。如果您不需要安裝這個工具列,請取消勾選對應選項。"
# renpy/common/00gltest.rpy:183
old "When setup finishes, please click below to restart this program."
new "當安裝完成後請點選下方來重新啟動應用程式。"
# renpy/common/00gltest.rpy:185
old "Restart"
new "重新啟動"
translate None strings:
# renpy/common/00keymap.rpy:167
old "Saved screenshot as %s."
new "儲存螢幕截圖為 %s。"
translate None strings:
# renpy/common/00layout.rpy:439
old "Are you sure?"
new "是否確認?"
# renpy/common/00layout.rpy:443
old "Are you sure you want to quit?"
new "您確定您要離開嗎?"
# renpy/common/00layout.rpy:444
old "Are you sure you want to return to the main menu?\nThis will lose unsaved progress."
new "您確定您想回到標題畫面嗎?\n這將使您失去所有未儲存的進度。"
# renpy/common/00layout.rpy:441
old "Are you sure you want to overwrite your save?"
new "您確定您要覆寫您的存檔?"
# renpy/common/00layout.rpy:442
old "Loading will lose unsaved progress.\nAre you sure you want to do this?"
new "載入將會失去所有未儲存的進度。\n您確定您要這麼做嗎?"
# renpy/common/00layout.rpy:440
old "Are you sure you want to delete this save?"
new "您確定您要刪掉這份存檔嗎?"
translate None strings:
# renpy/common/00library.rpy:77
old "Skip Mode"
new "跳過對話模式"
# renpy/common/00library.rpy:80
old "Fast Skip Mode"
new "快速跳過對話模式"
translate None strings:
# renpy/common/00updater.rpy:1258
old "Updater"
new "更新"
# renpy/common/00updater.rpy:1267
old "This program is up to date."
new "該程式已是最新版本。"
# renpy/common/00updater.rpy:1269
old "[u.version] is available. Do you want to install it?"
new "[u.version] 已釋出。是否確認安裝?"
# renpy/common/00updater.rpy:1271
old "Preparing to download the updates."
new "正在準備下載更新。"
# renpy/common/00updater.rpy:1273
old "Downloading the updates."
new "正在下載更新。"
# renpy/common/00updater.rpy:1275
old "Unpacking the updates."
new "解壓縮更新檔案。"
# renpy/common/00updater.rpy:1279
old "The updates have been installed. The program will restart."
new "該更新檔案已安裝,程式將會重新啟動。"
# renpy/common/00updater.rpy:1281
old "The updates have been installed."
new "已完成更新。"
# renpy/common/00updater.rpy:1283
old "The updates were cancelled."
new "已取消更新。"
translate None strings:
# renpy/common/_compat/preferences.rpym:411
old "Joystick Mapping"
new "遊戲桿映射"
translate None strings:
# renpy/common/_errorhandling.rpym:408
old "An exception has occurred."
new "發生一個異常狀況。"
# renpy/common/_errorhandling.rpym:434
old "Rollback"
new "回滾"
# renpy/common/_errorhandling.rpym:436
old "Attempts a roll back to a prior time, allowing you to save or choose a different choice."
new "嘗試回滾到先前的狀態,使您可以存檔或者選擇不同選項。"
# renpy/common/_errorhandling.rpym:439
old "Ignore"
new "忽略"
# renpy/common/_errorhandling.rpym:441
old "Ignores the exception, allowing you to continue. This often leads to additional errors."
new "忽略異常,讓您可以繼續。這通常會產生額外的錯誤。"
# renpy/common/_errorhandling.rpym:444
old "Reload"
new "重新載入"
# renpy/common/_errorhandling.rpym:446
old "Reloads the game from disk, saving and restoring game state if possible."
new "從硬碟重新載入遊戲,請您儲存遊戲狀態。"
# renpy/common/_errorhandling.rpym:448
old "Open Traceback"
new "開啟回溯"
# renpy/common/_errorhandling.rpym:450
old "Opens the traceback.txt file in a text editor."
new "在編輯器中開啟回溯檔案(traceback.txt)。"
# renpy/common/_errorhandling.rpym:456
old "Quits the game."
new "離開遊戲。"
# renpy/common/_errorhandling.rpym:483
old "Parsing the script failed."
new "解析腳本失敗。"
# renpy/common/_errorhandling.rpym:510
old "Open Parse Errors"
new "開啟解析錯誤"
# renpy/common/_errorhandling.rpym:512
old "Opens the errors.txt file in a text editor."
new "在編輯器中開啟解析錯誤檔案(errors.txt)。"
translate None strings:
# renpy/common/_layout/classic_load_save.rpym:152
old "a"
new "a"
# renpy/common/_layout/classic_load_save.rpym:161
old "q"
new "q"
translate None strings:
# renpy/common/00action_file.rpy:587
old "Quick save complete."
new "快速儲存。"
translate None strings:
# renpy/common/00gallery.rpy:521
old "Image [index] of [count] locked."
new "[count]個圖片中的第[index]個圖片被鎖定。"
# renpy/common/00gallery.rpy:539
old "prev"
new "上一頁"
# renpy/common/00gallery.rpy:540
old "next"
new "下一頁"
# renpy/common/00gallery.rpy:541
old "slideshow"
new "幻燈片"
# renpy/common/00gallery.rpy:542
old "return"
new "返回"
translate None strings:
# renpy/common/00layout.rpy:427
old "Are you sure you want to begin skipping?"
new "是否確定開始略過?"
# renpy/common/00layout.rpy:428
old "Are you sure you want to skip to the next choice?"
new "是否確定跳到下一個選項?"
# renpy/common/00layout.rpy:429
old "Are you sure you want to skip to unseen dialogue or the next choice?"
new "是否確定略過未看過的訊息或下一選項?"
translate None strings:
# renpy/common/00console.rpy:179
old "%(version)s console, originally by Shiz, C, and delta.\n"
new "%(version)s 控制臺,作者: Shiz, C, delta。"
# renpy/common/00console.rpy:180
old "Press <esc> to exit console. Type help for help.\n"
new "按 <esc> 來退出控制臺。輸入 help 來檢視說明。\n"
# renpy/common/00console.rpy:184
old "Ren'Py script enabled."
new "使用 Ren'Py 腳本。"
# renpy/common/00console.rpy:186
old "Ren'Py script disabled."
new "禁用 Ren'Py 腳本。"
# renpy/common/00console.rpy:392
old "help: show this help"
new "help: 顯示說明資訊"
# renpy/common/00console.rpy:397
old "commands:\n"
new "命令列:\n"
# renpy/common/00console.rpy:407
old " <renpy script statement>: run the statement\n"
new " <renpy script statement>:運行語句\n"
# renpy/common/00console.rpy:409
old " <python expression or statement>: run the expression or statement"
new " <python expression or statement>:運行運算式或語句"
# renpy/common/00console.rpy:417
old "clear: clear the console history"
new "clear: 清除控制臺歷史記錄"
# renpy/common/00console.rpy:421
old "exit: exit the console"
new "exit: 離開控制臺"
# renpy/common/00console.rpy:429
old "load <slot>: loads the game from slot"
new "load <slot>:載入遊戲存檔(以 slot 為存檔號)"
# renpy/common/00console.rpy:442
old "save <slot>: saves the game in slot"
new "save <slot>:儲存遊戲存檔(以 slot 為存檔號)"
# renpy/common/00console.rpy:453
old "reload: reloads the game, refreshing the scripts"
new "reload: 重新載入遊戲,並重新整理腳本"
# renpy/common/00console.rpy:461
old "watch <expression>: watch a python expression"
new "watch <expression>: 監視一個 python 運算式"
# renpy/common/00console.rpy:470
old "unwatch <expression>: stop watching an expression"
new "unwatch <expression>:停止監視某個運算式"
# renpy/common/00console.rpy:478
old "unwatchall: stop watching all expressions"
new "unwatchall:停止監視索引運算式"
# renpy/common/00console.rpy:484
old "jump <label>: jumps to label"
new "jump <label>: 跳移至標籤"
translate None strings:
# renpy/common/_developer/developer.rpym:65
old "Developer Menu"
new "開發者選單"
# renpy/common/_developer/developer.rpym:67
old "Reload Game (Shift+R)"
new "重新載入遊戲(Shift+R"
# renpy/common/_developer/developer.rpym:69
old "Console (Shift+O)"
new "控制臺(Shift+O)"
# renpy/common/_developer/developer.rpym:71
old "Variable Viewer"
new "變數觀察器"
# renpy/common/_developer/developer.rpym:73
old "Theme Test"
new "介面主題測試"
# renpy/common/_developer/developer.rpym:75
old "Image Location Picker"
new "圖片座標撿選器"
# renpy/common/_developer/developer.rpym:77
old "Filename List"
new "檔案清單"
# renpy/common/_developer/developer.rpym:81
old "Show Image Load Log"
new "顯示圖片載入記錄"
# renpy/common/_developer/developer.rpym:84
old "Hide Image Load Log"
new "隱藏圖片載入記錄"
# renpy/common/_developer/developer.rpym:149
old "No variables have changed since the game started."
new "遊戲開始至此沒有任何變數被改變。"
# renpy/common/_developer/developer.rpym:152
old "Return to the developer menu"
new "回到開發者選單"
# renpy/c72
old "{b}Missing Images{/b}"
new "{b}丟失圖片{/b}"
# renpy/common/_developer/developer.rpym:424
old "Rectangle: %r"
new "矩形區域:%r"
# renpy/common/_developer/developer.rpym:429
old "Mouse position: %r"
new "滑鼠位置:%r"
# renpy/common/_developer/developer.rpym:431
old "Right-click or escape to quit."
new "點選滑鼠右鍵或者按 Esc 鍵來退出。"
# renpy/common/_developer/developer.rpym:482
old "Done"
new "完成"
translate None strings:
# renpy/common/_developer/inspector.rpym:43
old "Displayable Inspector"
new "Displayable 檢閱器"
# renpy/common/_developer/inspector.rpym:49
old "Nothing to inspect."
new "沒有東西被檢閱"
# renpy/common/_developer/inspector.rpym:58
old "Size"
new "大小"
# renpy/common/_developer/inspector.rpym:63
old "Style"
new "風格"
# renpy/common/_developer/inspector.rpym:123
old "Inspecting Styles of [displayable_name!q]"
new "檢閱[displayable_name!q]的風格"
# renpy/common/_developer/inspector.rpym:135
old "displayable:"
new "displayable"
# renpy/common/_developer/inspector.rpym:142
old " (no properties affect the displayable)"
new " (沒有偏好的可顯示屬性)"
# renpy/common/_developer/inspector.rpym:144
old " (default properties omitted)"
new " (忽略預設屬性)"
# renpy/common/_developer/inspector.rpym:174
old "<repr() failed>"
new "<repr() failed>"
@@ -0,0 +1,178 @@

translate None strings:
# game/screens.rpy:192
old "Start Game"
new "開始遊戲"
# game/screens.rpy:193
old "Load Game"
new "載入遊戲"
# game/screens.rpy:194
old "Preferences"
new "設定"
# game/screens.rpy:195
old "Help"
new "説明"
# game/screens.rpy:196
old "Quit"
new "離開"
# game/screens.rpy:224
old "Return"
new "返回"
# game/screens.rpy:226
old "Save Game"
new "儲存遊戲"
# game/screens.rpy:228
old "Main Menu"
new "標題畫面"
# game/screens.rpy:259
old "Previous"
new "上一頁"
# game/screens.rpy:262
old "Auto"
new "自動"
# game/screens.rpy:265
old "Quick"
new "快速"
# game/screens.rpy:272
old "Next"
new "下一頁"
# game/screens.rpy:298
old "Empty Slot."
new "空白檔位"
# game/screens.rpy:357
old "Display"
new "顯示"
# game/screens.rpy:358
old "Window"
new "視窗"
# game/screens.rpy:359
old "Fullscreen"
new "全螢幕"
# game/script.rpy:22
old "Transitions"
new "過渡"
# game/screens.rpy:366
old "All"
new "全部"
# game/screens.rpy:367
old "None"
new "無"
# game/screens.rpy:373
old "Text Speed"
new "文字顯示速度"
# game/screens.rpy:380
old "Joystick..."
new "遊戲桿..."
# game/screens.rpy:387
old "Language"
new "語言"
# game/screens.rpy:397
old "Skip"
new "略過"
# game/screens.rpy:398
old "Seen Messages"
new "已阅訊息"
# game/screens.rpy:399
old "All Messages"
new "全部訊息"
# game/screens.rpy:405
old "Begin Skipping"
new "開始略過"
# game/screens.rpy:411
old "After Choices"
new "選擇後"
# game/screens.rpy:412
old "Stop Skipping"
new "停止略過"
# game/screens.rpy:413
old "Keep Skipping"
new "繼續略過"
# game/screens.rpy:419
old "Auto-Forward Time"
new "自動前進時間"
# game/screens.rpy:427
old "Music Volume"
new "音樂音量"
# game/screens.rpy:434
old "Sound Volume"
new "音效音量"
# game/screens.rpy:438
old "Test"
new "測試"
# game/screens.rpy:446
old "Voice Volume"
new "語音音量"
# game/screens.rpy:504
old "Yes"
new "是"
# game/screens.rpy:505
old "No"
new "否"
# game/screens.rpy:527
old "Q.Save"
new "Q.儲存"
# game/screens.rpy:528
old "Q.Load"
new "Q.讀取"
# game/screens.rpy:529
old "Save"
new "儲存"
# game/screens.rpy:532
old "Prefs"
new "設定"
# game/screens.rpy:423
old "Wait for Voice"
new "等待語音"
# game/screens.rpy:535
old "Back"
new "返回"
# game/screens.rpy:540
old "F.Skip"
new "F.略過"
# game/screens.rpy:453
old "Voice Sustain"
new "聲音維持"
@@ -0,0 +1 @@
{ "type" : "template" }