Compare commits

...

5 Commits

Author SHA1 Message Date
Tom Rothamel 4fa4ffae54 Releasing 6.9.0c. 2009-03-06 18:32:31 -05:00
Tom Rothamel 4ecd72de6e Readying 6.9.0b 2009-03-02 22:40:15 -05:00
Tom Rothamel 3ec495c3fc Fix fill problem.
Move only named layers.
Fix focus problem.
2009-03-02 21:50:50 -05:00
Tom Rothamel 5efc437384 Fixed rounding issue in place. 2009-03-02 15:29:55 -05:00
Tom Rothamel a777f4d3b1 Fix negative render size. 2009-03-01 20:06:19 -05:00
11 changed files with 91 additions and 35 deletions
+7 -6
View File
@@ -104,6 +104,12 @@ example) a dissolve would cause the overlay to blink out and then
dissolve back in again.
MoveTransition and define.move_transitions have been changed to take
a layers argument, giving the list of layers the transition applies
to. By default, this is only the master layer, which is a change in
their behavior.
Calling theme.roundrect() no longer implies layout.button_menu().
@@ -115,12 +121,7 @@ Fixed a divide by zero error that occured when Alpha was used for 0
seconds.
The sound libraries have been upgraded:
* libvorbis is now at 1.2.0
* SDL_sound is now a development version, which includes the mpg123
decoder. According to the release announcment: ". Unlike mpglib, this
decoder seems to play mp3s that were recorded after 1999, too. :-)"
Libvorbis has been upgraded to version 1.2.0.
To reduce distribution size, OGG Speex support was dropped.
+10 -1
View File
@@ -62,58 +62,67 @@ init -1110 python:
return .5 - math.cos(math.pi * x) / 2.0
# This defines a family of move transitions.
def move_transitions(prefix, delay, time_warp=None, in_time_warp=None, out_time_warp=None, old=False):
def move_transitions(prefix, delay, time_warp=None, in_time_warp=None, out_time_warp=None, old=False, layers=[ 'master' ]):
moves = {
"" : MoveTransition(
delay,
old=old,
layers=layers,
factory=MoveFactory(time_warp=time_warp)),
"inright" : MoveTransition(
delay,
old=old,
layers=layers,
factory=MoveFactory(time_warp=time_warp),
enter_factory=MoveIn((1.0, None, 0.0, None), time_warp=in_time_warp)),
"inleft" : MoveTransition(
delay,
old=old,
layers=layers,
factory=MoveFactory(time_warp=time_warp),
enter_factory=MoveIn((0.0, None, 1.0, None), time_warp=in_time_warp)),
"intop" : MoveTransition(
delay,
old=old,
layers=layers,
factory=MoveFactory(time_warp=time_warp),
enter_factory=MoveIn((None, 0.0, None, 1.0), time_warp=in_time_warp)),
"inbottom" : MoveTransition(
delay,
old=old,
layers=layers,
factory=MoveFactory(time_warp=time_warp),
enter_factory=MoveIn((None, 1.0, None, 0.0), time_warp=in_time_warp)),
"outright" : MoveTransition(
delay,
old=old,
layers=layers,
factory=MoveFactory(time_warp=time_warp),
leave_factory=MoveOut((1.0, None, 0.0, None), time_warp=out_time_warp)),
"outleft" : MoveTransition(
delay,
old=old,
layers=layers,
factory=MoveFactory(time_warp=time_warp),
leave_factory=MoveOut((0.0, None, 1.0, None), time_warp=out_time_warp)),
"outtop" : MoveTransition(
delay,
old=old,
layers=layers,
factory=MoveFactory(time_warp=time_warp),
leave_factory=MoveOut((None, 0.0, None, 1.0), time_warp=out_time_warp)),
"outbottom" : MoveTransition(
delay,
old=old,
layers=layers,
factory=MoveFactory(time_warp=time_warp),
leave_factory=MoveOut((None, 1.0, None, 0.0), time_warp=time_warp)),
}
+1 -1
View File
@@ -57,7 +57,7 @@ label new:
if d.startswith("."):
dirs.remove(d)
dn = dir + "/" + d
shutil.rmtree(dn)
shutil.rmtree(dn, True)
# Change the save directory.
options = file(name + "/game/options.rpy").read()
+21 -6
View File
@@ -79,6 +79,13 @@
movq_r2m(r, scratch); \
printf(s, scratch);
// This expands registers 4 and 5, which are initialized below.
#define MMX_EXPAND() \
pxor_r2r(mm2, mm2); \
punpcklbw_r2r(mm2, mm4); \
punpcklbw_r2r(mm2, mm5);
// This expects the two old pixels to be arranged like:
// mm4 mm0
// mm5 mm1
@@ -159,7 +166,7 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
long long scratch;
if (!SDL_HasMMX()) {
return 0;
}
@@ -207,7 +214,8 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
}
// Figure out how many pixels we need to draw on each line.
normal_pixels = min(srcw - sy - 1, dstw - xo);
normal_pixels = min(srcw - sx - 1, dstw - xo);
if (normal_pixels < dstw - xo) {
draw_finalx = 1;
} else {
@@ -228,11 +236,11 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
if (xo >= dstw) {
goto done;
}
// Draw the first line, when sy == -1.
if (sy == -1) {
if (yo >= dsth) {
goto done;
}
@@ -249,7 +257,8 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
movd_m2r(blankpixel, mm4);
movd_m2r(pixel, mm5);
MMX_EXPAND();
s1 += 4;
d = dstpixels + xo * 4 + yo * dstpitch;
@@ -300,17 +309,21 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
movd_m2r(* (unsigned int *) s1, mm5);
}
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);
MMX_INTERP(* (unsigned int *) d);
d += 4;
s0 += 4;
s1 += 4;
@@ -354,6 +367,8 @@ int subpixel32(PyObject *pysrc, PyObject *pydst,
movd_m2r(blankpixel, mm5);
}
MMX_EXPAND();
s0 += 4;
d = dstpixels + xo * 4 + yo * dstpitch;
+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.0a"
version = "Ren'Py 6.9.0c"
script_version = 5003000
savegame_suffix = "-LT1.save"
+1
View File
@@ -362,6 +362,7 @@ def report_exception(e):
print >>f
print >>f, renpy.game.exception_info
report_tb(f, tb)
print >>f
print >>f, "Ren'Py Version:", renpy.version
+13 -7
View File
@@ -289,13 +289,16 @@ class Displayable(renpy.object.Object):
xoff = xpos
if type(xoff) is float:
xoff = xoff * width
xoff_mul = width
else:
xoff_mul = 1
if type(xanchor) is float:
xoff -= sw * xanchor
xanchor_mul = sw
else:
xoff -= xanchor
xanchor_mul = 1
xoff = xoff * xoff_mul - xanchor * xanchor_mul
xoff += x
# y
@@ -303,13 +306,16 @@ class Displayable(renpy.object.Object):
yoff = ypos
if type(yoff) is float:
yoff = yoff * height
yoff_mul = height
else:
yoff_mul = 1
if type(yanchor) is float:
yoff -= sh * yanchor
if absolute or isinstance(yanchor, int):
yoff -= yanchor
yanchor_mul = sh
else:
yanchor_mul = 1
yoff = yoff * yoff_mul - yanchor * yanchor_mul
yoff += y
# Add in offsets.
+12 -1
View File
@@ -45,6 +45,16 @@ class Focus(object):
self.w,
self.h)
def __repr__(self):
return "<Focus: %r %r (%r, %r, %r, %r)>" % (
self.widget,
self.arg,
self.x,
self.y,
self.w,
self.h)
# The current focus argument.
argument = None
@@ -355,6 +365,7 @@ def focus_nearest(from_x0, from_y0, from_x1, from_y1,
new_focus_dist = (65536.0 * renpy.config.focus_crossrange_penalty) ** 2
for f in focus_list:
if f is from_focus:
continue
@@ -364,7 +375,7 @@ def focus_nearest(from_x0, from_y0, from_x1, from_y1,
if not condition(from_focus, f):
continue
tx0 = f.x + f.w * to_x0
ty0 = f.y + f.h * to_y0
tx1 = f.x + f.w * to_x1
+4 -4
View File
@@ -735,7 +735,7 @@ class Window(Container):
# Draw the background. The background should render at exactly the
# requested size. (That is, be a Frame or a Solid).
if style.background:
bw = width - cxmargin
bw = width - cxmargin
bh = height - cymargin
back = render(style.background, bw, bh, st, at)
@@ -937,13 +937,13 @@ class Interpolate(object):
if c is not None:
if type(a) is float:
a = renpy.display.core.absolute(a * c)
a = a * c
if type(b) is float:
b = renpy.display.core.absolute(b * c)
b = b * c
rv = a + t * (b - a)
return type(a)(rv)
return renpy.display.core.absolute(rv)
return [ interp(a, b, c) for a, b, c in zip(self.start, self.end, sizes) ]
+15 -3
View File
@@ -147,6 +147,11 @@ def render(d, width, height, st, at):
else:
height = min(ymaximum, height)
if width < 0:
width = 0
if height < 0:
height = 0
wh = (width, height)
rv = render_cache[d].get(wh, None)
@@ -563,8 +568,6 @@ class Render(object):
if isinstance(source, Render):
source.parents.add(self)
source.refcount += 1
def get_size(self):
"""
@@ -752,7 +755,7 @@ class Render(object):
maxx = max(x1, x2) + x
maxy = max(y1, y2) + y
focuses.append(renpy.display.focus.Focus(d, arg, minx, miny, maxx, maxy))
focuses.append(renpy.display.focus.Focus(d, arg, minx, miny, maxx - minx, maxy - miny))
for child, xo, yo, focus, main in self.children:
if not focus or not isinstance(child, Render):
@@ -914,6 +917,15 @@ class Render(object):
return False
def fill(self, color):
"""
Fills this Render with the given color.
"""
color = renpy.easy.color(color)
solid = renpy.display.im.SolidImage(color, self.width, self.height)
surf = render(solid, self.width, self.height, 0, 0)
self.blit(surf, (0, 0), focus=False, main=False)
def canvas(self):
"""
+6 -5
View File
@@ -692,7 +692,7 @@ def RevolveInOut(start, end, pos, delay, d, **kwargs):
return renpy.display.layout.Revolve(start, end, delay, d, pos=pos, **kwargs)
# TODO: Move isn't properly respecting positions when x < 0.
def MoveTransition(delay, old_widget=None, new_widget=None, factory=None, enter_factory=None, leave_factory=None, old=False):
def MoveTransition(delay, old_widget=None, new_widget=None, factory=None, enter_factory=None, leave_factory=None, old=False, layers=[ 'master' ]):
"""
This transition attempts to find images that have changed
position, and moves them from the old position to the new
@@ -758,10 +758,11 @@ def MoveTransition(delay, old_widget=None, new_widget=None, factory=None, enter_
f = new.layers[layer]
if isinstance(f, renpy.display.layout.MultiBox) \
and f.scene_list is not None \
and layer not in renpy.config.overlay_layers:
if (isinstance(f, renpy.display.layout.MultiBox)
and layer in layers
and f.scene_list is not None
and layer not in renpy.config.overlay_layers):
f = merge_slide(old.layers[layer], new.layers[layer])
rv.layers[layer] = f