Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9483a7daa5 | |||
| 89d93544a7 | |||
| 5f08daa85a | |||
| d891dd290c | |||
| 0b366f6850 | |||
| 899bf47d34 | |||
| 888c485186 | |||
| dbbabbb2dc | |||
| 7a38331f8c | |||
| 0dbcb352c9 | |||
| 1ab0b43202 | |||
| 106d95e795 | |||
| cf9005e457 | |||
| be7fd4fa13 | |||
| b0f848b089 | |||
| 07077e89b1 | |||
| bc2a0451db | |||
| 4e38257900 | |||
| f934838a59 | |||
| ee0fb68d60 | |||
| 37e8fd19cd | |||
| f600e6a24b | |||
| ca9009f5fe | |||
| 9a299a9b38 | |||
| 845ae6e7ba |
@@ -98,3 +98,9 @@ lib/python
|
||||
lib/update-version.txt
|
||||
sphinx/game/saves
|
||||
tutorial/game/saves
|
||||
doc
|
||||
unparse.py
|
||||
module/glrtt_fbo.c
|
||||
module/glrtt_fbo.html
|
||||
tutorial/game/cache
|
||||
renpy.exe.log
|
||||
|
||||
@@ -38,7 +38,6 @@ Ren'Py binaries include code from the following projects:
|
||||
* SDL (LGPL)
|
||||
* SDL_image (LGPL)
|
||||
* SDL_ttf (LGPL)
|
||||
* SDL_mixer (LGPL)
|
||||
* Freetype (LGPL)
|
||||
* FFmpeg (LGPL)
|
||||
* Fribidi (LGPL)
|
||||
@@ -49,7 +48,6 @@ Ren'Py binaries include code from the following projects:
|
||||
* pyobjc (MIT License)
|
||||
* py2exe (MIT License)
|
||||
* GLEW (Modified BSD, MIT)
|
||||
* tegl (Modified BSD)
|
||||
|
||||
For the purpose of LGPL compliance, the source code to all LGPL
|
||||
software we depend on is either in the Ren'Py package (available from
|
||||
|
||||
@@ -94,7 +94,7 @@ init -1180 python:
|
||||
|
||||
|
||||
def _default_empty_window():
|
||||
|
||||
|
||||
who = _last_say_who
|
||||
|
||||
if who is not None:
|
||||
|
||||
@@ -1166,6 +1166,52 @@ init -1140 python:
|
||||
return auto
|
||||
else:
|
||||
return page
|
||||
|
||||
def FileSlotName(slot, slots_per_page, auto="a", quick="q", format="%s%d"):
|
||||
"""
|
||||
:doc: file_action_function
|
||||
|
||||
Returns the name of the numbered slot. This assumes that slots on
|
||||
normal pages are numbered in a linear order starting with 1, and
|
||||
that page numbers start with 1. When slot is 2, and slots_per_page
|
||||
is 10, and the other variables are the defauts:
|
||||
|
||||
* When the first page is slowing, this returns "2".
|
||||
* When the second page is showing, this returns "12".
|
||||
* When the auto page is showing, this returns "a2".
|
||||
* When the quicksave page is showing, this returns "q2".
|
||||
|
||||
`slot`
|
||||
The number of the slot to access.
|
||||
|
||||
`slots_per_page`
|
||||
The number of slots per page.
|
||||
|
||||
`auto`
|
||||
A prefix to use for the auto page.
|
||||
|
||||
`quick`
|
||||
A prefix to use for the quick page.
|
||||
|
||||
`format`
|
||||
The formatting code to use. This is given two arguments: A string
|
||||
giving the page prefix, and an integer giving the slot number.
|
||||
"""
|
||||
|
||||
page = persistent._file_page
|
||||
|
||||
if page == "quick":
|
||||
prefix = quick
|
||||
page = 0
|
||||
elif page == "auto":
|
||||
prefix = auto
|
||||
page = 0
|
||||
else:
|
||||
prefix = ""
|
||||
page = int(page) - 1
|
||||
|
||||
return format % (prefix, page * slots_per_page + slot)
|
||||
|
||||
|
||||
class FilePageNext(Action):
|
||||
"""
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import os
|
||||
# ***** ***** ***** ***** ***** ***** **** ***** ***** ***** *****
|
||||
# Be sure to change script_version in launcher/script_version.rpy, too!
|
||||
# Be sure to change _renpy.pyx and module.py, if necessary.
|
||||
version = "Ren'Py 6.12.0d"
|
||||
version = "Ren'Py 6.12.0f"
|
||||
|
||||
|
||||
# Other versions.
|
||||
|
||||
+3
-3
@@ -359,13 +359,13 @@ class Say(Node):
|
||||
if renpy.config.say_menu_text_filter:
|
||||
what = renpy.config.say_menu_text_filter(what) # E1102
|
||||
|
||||
say_menu_with(self.with_, renpy.game.interface.set_transition)
|
||||
renpy.exports.say(who, what, interact=getattr(self, 'interact', True))
|
||||
|
||||
if getattr(who, "record_say", True):
|
||||
renpy.store._last_say_who = self.who
|
||||
renpy.store._last_say_what = what
|
||||
|
||||
say_menu_with(self.with_, renpy.game.interface.set_transition)
|
||||
renpy.exports.say(who, what, interact=getattr(self, 'interact', True))
|
||||
|
||||
return self.next
|
||||
|
||||
def predict(self):
|
||||
|
||||
@@ -167,8 +167,8 @@ cdef class GLDraw:
|
||||
# Should we use the fast (but incorrect) dissolve mode?
|
||||
self.fast_dissolve = False # renpy.android
|
||||
|
||||
# Should we use clipping planes or stencils?
|
||||
self.use_clipping_planes = True
|
||||
# Should we use clipping planes or scissors?
|
||||
self.use_clipping_planes = False
|
||||
|
||||
# Should we always report pixels as being always opaque?
|
||||
self.always_opaque = renpy.android
|
||||
@@ -428,11 +428,6 @@ cdef class GLDraw:
|
||||
|
||||
renpy.log.info("Number of texture units: %d", texture_units)
|
||||
|
||||
if texture_units < 4 and not self.fast_dissolve:
|
||||
renpy.log.info("Not enough texture units.")
|
||||
return False
|
||||
|
||||
|
||||
# Count the number of clip planes.
|
||||
cdef GLint clip_planes = 0
|
||||
|
||||
|
||||
+5
-14
@@ -350,15 +350,9 @@ class Frame(renpy.display.core.Displayable):
|
||||
dw = int(width)
|
||||
dh = int(height)
|
||||
|
||||
xb = self.xborder
|
||||
yb = self.yborder
|
||||
|
||||
if xb * 2 >= sw:
|
||||
xb = sw / 2 - 1
|
||||
|
||||
if yb * 2 >= sh:
|
||||
yb = sh / 2 - 1
|
||||
|
||||
xb = min(self.xborder, sw / 2 - 1, width / 2 - 1)
|
||||
yb = min(self.yborder, sh / 2 - 1, height / 2 - 1)
|
||||
|
||||
rv = Render(dw, dh)
|
||||
|
||||
self.draw_pattern(draw, xb, yb)
|
||||
@@ -417,12 +411,9 @@ class Frame(renpy.display.core.Displayable):
|
||||
sw, sh = source.get_size()
|
||||
dw, dh = dest.get_size()
|
||||
|
||||
if xb * 2 >= sw:
|
||||
xb = sw / 2 - 1
|
||||
xb = min(xb, sw / 2 - 1, dw / 2 - 1)
|
||||
yb = min(yb, sh / 2 - 1, dh / 2 - 1)
|
||||
|
||||
if yb * 2 >= sh:
|
||||
yb = sh / 2 - 1
|
||||
|
||||
def draw(x0, x1, y0, y1):
|
||||
|
||||
# Compute the coordinates of the left, right, top, and
|
||||
|
||||
@@ -127,7 +127,8 @@ def prediction_coroutine(root_widget):
|
||||
renpy.display.screen.predict_screen(name, **kwargs)
|
||||
except:
|
||||
if renpy.config.debug_image_cache:
|
||||
traceback.print_exc()
|
||||
renpy.log.debug("While predicting screen %s %r", name, kwargs)
|
||||
renpy.log.debug_exception()
|
||||
|
||||
predicting = False
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@ import threading
|
||||
import renpy
|
||||
import gc
|
||||
|
||||
cdef class Render
|
||||
|
||||
# We grab the blit lock each time it is necessary to blit
|
||||
# something. This allows call to the pygame.transform functions to
|
||||
# disable blitting, should it prove necessary.
|
||||
|
||||
+5
-7
@@ -412,16 +412,14 @@ def predict_menu():
|
||||
#
|
||||
# An item lets us load imagebuttons as necessary.
|
||||
|
||||
items = [ ("Menu Prediction", True, "button", "caption") ]
|
||||
props = {
|
||||
"button" : { "style" : "menu_choice_button" },
|
||||
"caption" : { "style" : "menu_choice" },
|
||||
}
|
||||
if not renpy.config.choice_screen_chosen:
|
||||
return
|
||||
|
||||
items = [ ("Menu Prediction", True, False) ]
|
||||
|
||||
predict_screen(
|
||||
"choice",
|
||||
items=items,
|
||||
_widget_properties=props,
|
||||
)
|
||||
|
||||
|
||||
@@ -547,7 +545,7 @@ def display_menu(items,
|
||||
# Mark this as chosen.
|
||||
for label, val in items:
|
||||
if rv == val:
|
||||
chosen[(location, val)] = True
|
||||
chosen[(location, label)] = True
|
||||
|
||||
|
||||
for label, val in items:
|
||||
|
||||
@@ -97,7 +97,9 @@ Screens
|
||||
Ren'Py now ships with a default set of screens, which are used by the
|
||||
demo and installed by default when a new game is created. You can find
|
||||
them in template/game/screens.rpy, and they can be used by copying
|
||||
that file into your project.
|
||||
that file into your project. These screens are not 100% compatible
|
||||
with the previous layout system - for example, some styles have
|
||||
changed. That's why games must opt-in to them.
|
||||
|
||||
The definition of the `items` parameter of the :ref:`Choice` and
|
||||
:ref:`NVL` screens has changed, and games will need to be updated to work
|
||||
@@ -114,6 +116,9 @@ imagemaps and imagebuttons.
|
||||
|
||||
The imagemap caching behavior described above applies only to screens.
|
||||
|
||||
The :func:`FilePageName` and :func:`FileSlotName` functions make it easier
|
||||
to name slots
|
||||
|
||||
Other Improvements
|
||||
------------------
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.. Automatically generated file - do not modify.
|
||||
|
||||
.. class:: Drag(d=None, drag_name=None, draggable=True, droppable=True, drag_raise=True, dragged=None, dropped=None, drag_handle=(0.0, 0.0, 1.0, 1.0), drag_joined=<function default_drag_joined at 0x22fb2a8>, clicked=None, hovered=None, unhovered=None, replaces=None, **properties)
|
||||
.. class:: Drag(d=None, drag_name=None, draggable=True, droppable=True, drag_raise=True, dragged=None, dropped=None, drag_handle=(0.0, 0.0, 1.0, 1.0), drag_joined=<function default_drag_joined at 0x1de72a8>, clicked=None, hovered=None, unhovered=None, replaces=None, **properties)
|
||||
|
||||
A displayable that represents an object that can be dragged around
|
||||
its enclosing area. A Drag can also represent an area that
|
||||
|
||||
@@ -24,6 +24,34 @@
|
||||
|
||||
The return value is a displayable.
|
||||
|
||||
.. function:: FileSlotName(slot, slots_per_page, auto='a', quick='q', format='%s%d')
|
||||
|
||||
Returns the name of the numbered slot. This assumes that slots on
|
||||
normal pages are numbered in a linear order starting with 1, and
|
||||
that page numbers start with 1. When slot is 2, and slots_per_page
|
||||
is 10, and the other variables are the defauts:
|
||||
|
||||
* When the first page is slowing, this returns "2".
|
||||
* When the second page is showing, this returns "12".
|
||||
* When the auto page is showing, this returns "a2".
|
||||
* When the quicksave page is showing, this returns "q2".
|
||||
|
||||
`slot`
|
||||
The number of the slot to access.
|
||||
|
||||
`slots_per_page`
|
||||
The number of slots per page.
|
||||
|
||||
`auto`
|
||||
A prefix to use for the auto page.
|
||||
|
||||
`quick`
|
||||
A prefix to use for the quick page.
|
||||
|
||||
`format`
|
||||
The formatting code to use. This is given two arguments: A string
|
||||
giving the page prefix, and an integer giving the slot number.
|
||||
|
||||
.. function:: FileTime(name, format='%b %d, %H:%M', empty='', page=None)
|
||||
|
||||
Returns the time the file was saved, formatted according
|
||||
|
||||
@@ -262,15 +262,18 @@ screen file_picker:
|
||||
|
||||
textbutton _("Next"):
|
||||
action FilePageNext()
|
||||
|
||||
$ columns = 2
|
||||
$ rows = 5
|
||||
|
||||
# Display a grid of file slots.
|
||||
grid 2 5:
|
||||
grid columns rows:
|
||||
transpose True
|
||||
xfill True
|
||||
style_group "file_picker"
|
||||
|
||||
# Display ten file slots, numbered 1 - 10.
|
||||
for i in range(1, 11):
|
||||
for i in range(1, columns * rows + 1):
|
||||
|
||||
# Each file slot is a button.
|
||||
button:
|
||||
@@ -283,9 +286,8 @@ screen file_picker:
|
||||
add FileScreenshot(i)
|
||||
|
||||
# Format the description, and add it as text.
|
||||
$ description = "%s-%d. %s\n%s" % (
|
||||
FilePageName(),
|
||||
i,
|
||||
$ description = "% 2s. %s\n%s" % (
|
||||
FileSlotName(i, columns * rows),
|
||||
FileTime(i, empty=_("Empty Slot.")),
|
||||
FileSaveName(i))
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
title=Ren'Py Demo
|
||||
author=PyTom
|
||||
orientation=landscape
|
||||
api_version=1
|
||||
@@ -262,15 +262,18 @@ screen file_picker:
|
||||
|
||||
textbutton _("Next"):
|
||||
action FilePageNext()
|
||||
|
||||
$ columns = 2
|
||||
$ rows = 5
|
||||
|
||||
# Display a grid of file slots.
|
||||
grid 2 5:
|
||||
grid columns rows:
|
||||
transpose True
|
||||
xfill True
|
||||
style_group "file_picker"
|
||||
|
||||
# Display ten file slots, numbered 1 - 10.
|
||||
for i in range(1, 11):
|
||||
for i in range(1, columns * rows + 1):
|
||||
|
||||
# Each file slot is a button.
|
||||
button:
|
||||
@@ -283,9 +286,8 @@ screen file_picker:
|
||||
add FileScreenshot(i)
|
||||
|
||||
# Format the description, and add it as text.
|
||||
$ description = "%s-%d. %s\n%s" % (
|
||||
FilePageName(),
|
||||
i,
|
||||
$ description = "% 2s. %s\n%s" % (
|
||||
FileSlotName(i, columns * rows),
|
||||
FileTime(i, empty=_("Empty Slot.")),
|
||||
FileSaveName(i))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user