Compare commits

...

20 Commits

Author SHA1 Message Date
Tom Rothamel 693cf9f8c9 Version bumps for 6.9.2 2009-05-05 02:09:59 -04:00
Tom Rothamel 35c2ec5a83 Fixed a bug that could cause it to take two tries to define a joystick
button.
2009-05-02 23:31:13 -04:00
Tom Rothamel 3b60efd744 Update changelog.
Fix dequeue to have correct semantics.
2009-05-02 23:05:27 -04:00
Tom Rothamel daac5d8ebf Doing anything besides rollforward during rollback now terminates
rollback.

Queueing music immediately after a play statement now allows the first 
track from the play statement to play.
2009-05-02 22:41:04 -04:00
Tom Rothamel 1fab6d8707 Prevent slow_done from being repeatedly called. 2009-05-02 21:32:24 -04:00
Tom Rothamel aaff11668a Catch errors when saving screenshots. 2009-05-02 20:21:18 -04:00
Tom Rothamel 536341a819 Fix problem with window icon on 16bit screen. 2009-05-01 22:16:29 -04:00
Tom Rothamel b9c468e446 Fix repeate word in the question. 2009-04-27 07:50:09 -04:00
Tom Rothamel 03edec9785 Fix a bug with Container. 2009-04-24 19:22:04 -04:00
Tom Rothamel da70a85d75 Bring in changes from staging. 2009-04-23 00:53:14 -04:00
Tom Rothamel 4ba170b8d8 Bring in features from mainline. 2009-04-23 00:52:04 -04:00
Tom Rothamel 72ae15c635 Back out some changes that lead to a slowdown in dissolve. 2009-04-22 23:16:49 -04:00
Tom Rothamel 1179066dda Bump version to 6.9.1h 2009-04-20 23:05:00 -04:00
Tom Rothamel 62d0093bee End skipping on rollback. 2009-04-20 23:01:10 -04:00
Tom Rothamel 55c0d3b4a7 Convert to alpha before smoothscaling windows icon. 2009-04-19 16:03:42 -04:00
Tom Rothamel 92014eafdd Fix a bug with the icon on windows. 2009-04-19 16:01:55 -04:00
Tom Rothamel b1be4c8ed4 The library alias for config has been removed. 2009-04-19 02:00:53 -04:00
Tom Rothamel 06f36dd8d1 Prevent infinite loop in error handling. 2009-04-19 01:31:26 -04:00
Tom Rothamel 3a15f5c717 6.9.1g 2009-04-18 23:24:22 -04:00
Tom Rothamel 031f3338b1 Scale screenshot using an alpha image. 2009-04-17 19:44:00 -04:00
18 changed files with 121 additions and 55 deletions
+40
View File
@@ -1,3 +1,43 @@
New in Ren'Py 6.9.2
-------------------
The semantics for play and queue have changed slightly. Now, when a
play statement is followed by one or more queue statements, the first
file in each play or queue statement will be played. For example:
play music "a.ogg"
queue music "b.ogg"
queue music "c.ogg"
will play "a.ogg", "b.ogg", and then loop "c.ogg". This change also
applies to renpy.music.play and renpy.music.queue.
Rollback was changed so that doing anything other than a roll-forward
while in rollback mode exits rollback immediately.
The library alias for config has been removed.
Fixed a regression that caused dissolves to be terribly slow.
Fixed a bug that caused Ren'Py to crash when playing music on Windows
when Data Execution Prevention was enabled. DEP is enabled by default
on 64-bit Windows Vista.
Fixed a bug that caused Ren'Py to crash when a window icon was used on
a computer with a 16-bit or 8-bit screen depth.
Fixed a bug that caused ui.sizer to malfunction.
Fixed a repeated word in "The Question".
Fixed a bug that could cause it to take two tries to define a joystick
button.
New in Ren'Py 6.9.1
-------------------
+3
View File
@@ -13,6 +13,9 @@ init -1210 python:
if version <= (6, 5, 0):
layout.compat()
if version <= (6, 9, 1):
store.library = store.config
init 1210 python hide::
# This returns true if the script_version is <= the
@@ -28,8 +28,6 @@ init python:
style.js_prefs_button.xminimum = 0.5
style.js_prefs_box.box_first_spacing = 10
config.joystick_keys = [
(u'Left', 'joy_left'),
(u'Right', 'joy_right'),
@@ -42,8 +40,6 @@ init python:
(u'Hide Text', 'joy_hide'),
(u'Menu', 'joy_menu'),
]
def _joystick_select_binding():
@@ -55,8 +51,8 @@ init python:
layout.button(_(label) + " - " + _(_preferences.joymap.get(key, u"Not Assigned")), "prefs_js", clicked=my_clicked, index=label)
def _joystick_get_binding():
ui.add(renpy.display.joystick.JoyBehavior())
ui.saybehavior()
ui.add(renpy.display.joystick.JoyBehavior())
def _joystick_take_binding(binding, key):
+1 -1
View File
@@ -1,3 +1,3 @@
init -999:
$ config.script_version = (6, 9, 1)
$ config.script_version = (6, 9, 2)
+1
View File
@@ -14,6 +14,7 @@ except:
# These control the level of optimization versus debugging.
extra_compile_args = [ "-O3", "-funroll-loops" ]
# extra_compile_args = [ "-O0", "-ggdb" ]
# extra_compile_args = [ "-O0", "-gstabs" ]
# This environment variable should have the full path to the installed
+1 -1
View File
@@ -27,7 +27,7 @@
# ***** ***** ***** ***** ***** ***** **** ***** ***** ***** *****
# Be sure to change script_version in launcher/script_version.rpy, too!
# Also check to see if we have to update renpy.py.
version = "Ren'Py 6.9.1f"
version = "Ren'Py 6.9.2a"
script_version = 5003000
savegame_suffix = "-LT1.save"
+19 -6
View File
@@ -240,6 +240,11 @@ class Channel(object):
# Is this channel tight?
self.tight = tight
# The number of items in the queue that should be kept
# on queue clear.
self.keep_queue = 0
if default_loop is None:
# By default, should we loop the music?
@@ -383,22 +388,27 @@ class Channel(object):
def dequeue(self, even_tight=False):
"""
Clears any queued music. Doesn't stop the playing music, if
any, but will prevent looping from occuring.
Clears the queued music.
If the first item in the queue has not been started, then it is
left in the queue unless all is given.
"""
self.queue = [ ]
self.queue = self.queue[:self.keep_queue]
self.loop = [ ]
if not pcm_ok:
return
pss.dequeue(self.number, even_tight)
if self.keep_queue == 0:
pss.dequeue(self.number, even_tight)
def interact(self):
"""
Called (mostly) once per interaction.
"""
self.keep_queue = 0
if pcm_ok:
@@ -427,6 +437,7 @@ class Channel(object):
of seconds. Also clears any queued music.
"""
self.keep_queue = 0
self.dequeue()
if not pcm_ok:
@@ -449,6 +460,8 @@ class Channel(object):
if tight is None:
tight = self.tight
self.keep_queue += 1
for filename in filenames:
qe = QueueEntry(filename, int(fadein * 1000), tight)
self.queue.append(qe)
-2
View File
@@ -185,8 +185,6 @@ def stop(channel="music", fadeout=None):
try:
c = get_channel(channel)
ctx = c.context
c.dequeue()
if fadeout is None:
fadeout = renpy.config.fade_music
+2 -3
View File
@@ -187,9 +187,7 @@ class Keymap(renpy.display.layout.Null):
class RollForward(renpy.display.layout.Null):
"""
This is a behavior that maps keys to functions that are called when
the key is pressed. The keys are specified by giving the appropriate
k_constant from pygame.constants, or the unicode for the key.
This behavior implements rollforward.
"""
def __init__(self, value):
@@ -202,6 +200,7 @@ class RollForward(renpy.display.layout.Null):
if map_event(ev, "rollforward"):
renpy.game.interface.suppress_transition = True
renpy.game.after_rollback = True
renpy.game.log.rolled_forward = True
return self.value
class PauseBehavior(renpy.display.layout.Null):
+17 -12
View File
@@ -699,15 +699,13 @@ class Display(object):
# Convert the aspect ratio to be square.
iw, ih = im.get_size()
if iw != ih:
imax = max(iw, ih)
square_im = renpy.display.scale.PygameSurface((imax, imax), pygame.SRCALPHA)
square_im.blit(im, ( (imax-iw)/2, (imax-ih)/2 ))
im = square_im
imax = max(iw, ih)
square_im = renpy.display.scale.PygameSurface((imax, imax), pygame.SRCALPHA, depth=32)
square_im.blit(im, ( (imax-iw)/2, (imax-ih)/2 ))
im = square_im
if on_windows and im.get_size() != (32, 32):
im = renpy.display.scale.real_bilinear(im, (32, 32))
im = renpy.display.scale.real_smoothscale(im, (32, 32))
pygame.display.set_icon(im)
@@ -1015,16 +1013,23 @@ class Display(object):
Saves a full-size screenshot in the given filename.
"""
renpy.display.scale.image_save_unscaled(self.window, filename)
try:
renpy.display.scale.image_save_unscaled(self.window, filename)
except:
if renpy.config.debug:
raise
pass
def screenshot(self, scale):
"""
Returns a pygame Surface that is a screenshot of the current
contents of the window.
Returns a string containing the contents of the window, as a PNG.
"""
surf = renpy.display.scale.smoothscale(self.window, scale)
surf = self.window.convert_alpha()
surf = renpy.display.scale.smoothscale(surf, scale)
surf = surf.convert()
sio = cStringIO.StringIO()
renpy.display.module.save_png(surf, sio, 0)
+1 -1
View File
@@ -26,7 +26,7 @@ import pygame
from pygame.constants import *
import renpy
from renpy.display.render import render, IDENTITY, Matrix2D
from renpy.display.render import render, Render, IDENTITY, Matrix2D
import time
import math
+4
View File
@@ -813,6 +813,7 @@ class Text(renpy.display.core.Displayable):
return True
else:
renpy.game.interface.timeout((self.slow_done_time + self.pause_length) - st)
if self.slow and self.style.slow_abortable and renpy.display.behavior.map_event(ev, "dismiss"):
self.slow = False
raise renpy.display.core.IgnoreEvent()
@@ -1301,6 +1302,9 @@ class Text(renpy.display.core.Displayable):
Called to call slow_done, and also to update slow_done_time.
"""
if not self.slow:
return
self.slow = False
if self.slow_done:
+8 -7
View File
@@ -286,7 +286,7 @@ class Pixellate(Transition):
rdr = render(visible, width, height, st, at)
surf = rdr.pygame_surface()
surf = rdr.pygame_surface(False)
if surf.get_size() != self.surface_size:
self.surface_size = surf.get_size()
@@ -347,15 +347,15 @@ class Dissolve(Transition):
bottom = render(self.old_widget, width, height, st, at)
top = render(self.new_widget, width, height, st, at)
bottom_surface = bottom.pygame_surface()
top_surface = top.pygame_surface()
bottom_surface = bottom.pygame_surface(self.alpha)
top_surface = top.pygame_surface(self.alpha)
width = min(top.width, bottom.width)
height = min(top.height, bottom.height)
def draw(dest, x, y):
dw, dh = dest.get_size()
w = min(dw, width + x)
@@ -370,6 +370,7 @@ class Dissolve(Transition):
dest.subsurface((0, 0, w, h)),
alpha)
if self.alpha:
rv = renpy.display.render.Render(width, height)
@@ -1063,8 +1064,8 @@ class ImageDissolve(Transition):
bottom = render(self.old_widget, width, height, st, at)
top = render(self.new_widget, width, height, st, at)
bottom_surface = bottom.pygame_surface()
top_surface = top.pygame_surface()
bottom_surface = bottom.pygame_surface(self.alpha)
top_surface = top.pygame_surface(self.alpha)
iw, ih = image.get_size()
+4 -3
View File
@@ -58,7 +58,7 @@ def roll_forward_info():
def in_rollback():
return renpy.game.log.in_rollback()
def checkpoint(data=None):
def checkpoint(data=None, keep_rollback=False):
"""
This creates a checkpoint that the user can rollback to. The
checkpoint is placed at the statement after the last statement
@@ -68,7 +68,7 @@ def checkpoint(data=None):
"""
if renpy.store._rollback:
renpy.game.log.checkpoint(data)
renpy.game.log.checkpoint(data, keep_rollback=keep_rollback)
def block_rollback():
"""
@@ -590,7 +590,7 @@ def pause(delay=None, music=None, with_none=None, hard=False):
roll_forward = None
rv = renpy.ui.interact(mouse='pause', type='pause', roll_forward=roll_forward)
renpy.exports.checkpoint(rv)
renpy.exports.checkpoint(rv, keep_rollback=True)
if with_none is None:
@@ -692,6 +692,7 @@ def rollback():
return
if renpy.config.rollback_enabled:
renpy.config.skipping = None
renpy.game.log.complete()
renpy.game.log.rollback(1)
+1 -1
View File
@@ -76,7 +76,7 @@ seen_session = { }
# The set of statements we've ever seen.
seen_ever = { }
# True if we're in the first interaction after a rollback.
# True if we're in the first interaction after a rollback or rollforward.
after_rollback = False
# Code that's run after the init code.
+14 -5
View File
@@ -601,13 +601,19 @@ class RollbackLog(renpy.object.Object):
self.ever_been_changed = { }
self.rollback_limit = 0
self.forward = [ ]
# Did we just do a roll forward?
self.rolled_forward = False
# Reset the RNG on the creation of a new game.
rng.reset()
def after_setstate(self):
self.mutated = { }
self.rolled_forward = False
def begin(self):
"""
Called before a node begins executing, to indicate that the
@@ -639,6 +645,8 @@ class RollbackLog(renpy.object.Object):
# save code.
global mutate_flag
mutate_flag = True
self.rolled_forward = False
def complete(self):
"""
@@ -738,7 +746,7 @@ class RollbackLog(renpy.object.Object):
return None
def checkpoint(self, data=None):
def checkpoint(self, data=None, keep_rollback=False):
"""
Called to indicate that this is a checkpoint, which means
that the user may want to rollback to just before this
@@ -760,7 +768,10 @@ class RollbackLog(renpy.object.Object):
# Otherwise, clear the forward stack.
fwd_name, fwd_data = self.forward[0]
if (self.current.context.current == fwd_name and data == fwd_data):
if (self.current.context.current == fwd_name
and data == fwd_data
and (keep_rollback or self.rolled_forward)
):
self.forward.pop(0)
else:
self.forward = [ ]
@@ -768,8 +779,6 @@ class RollbackLog(renpy.object.Object):
# Log the data in case we roll back again.
self.current.forward = data
def block(self):
"""
Called to indicate that the user should not be able to rollback
+3 -7
View File
@@ -53,9 +53,6 @@ _config = renpy.config
class _Config(object):
def __init__(self, name):
vars(self)["_name"] = name
def register(self, name, default, cat=None, help=None):
setattr(self, name, default)
_config.help.append((cat, name, help))
@@ -64,7 +61,7 @@ class _Config(object):
cvars = vars(_config)
if name not in cvars:
raise Exception('%s.%s is not a known configuration variable.' % (self._name, name))
raise Exception('config.%s is not a known configuration variable.' % (name))
return cvars[name]
@@ -72,7 +69,7 @@ class _Config(object):
cvars = vars(_config)
if name not in cvars and renpy.config.locked:
raise Exception('%s.%s is not a known configuration variable.' % (self._name, name))
raise Exception('config.%s is not a known configuration variable.' % (name))
if name == "script_version":
renpy.store._set_script_version(value)
@@ -85,8 +82,7 @@ class _Config(object):
else:
delattr(renpy.config, name)
config = _Config("config")
library = _Config("library")
config = _Config()
_list = list
_dict = dict
+1 -1
View File
@@ -190,7 +190,7 @@ label marry:
s "I know. So, will you marry me?"
m "Ummm, of course I will. I've actually been meaning to ask you, but since you brought it up..."
s "I know, but you are so indecisive, that I thought I'd take the initiative. "
m "I guess... It's all all about asking the right question... at the right time."
m "I guess... It's all about asking the right question... at the right time."
show sylvie2 giggle