**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
// is 1.0, and the layer doesn't depend on its context, then
// we don't want to render the context
if (composite &&
- Color::is_straight(composite->get_blend_method()) &&
+ composite->get_blend_method() == Color::BLEND_STRAIGHT &&
composite->get_amount() == 1.0f &&
!composite->reads_context())
{
// using the appropriate 'amount'
if (straight_and_empty)
{
- if (ret = Context((context+1)).accelerated_render(surface,quality,renddesc,cb))
+ if ((ret = Context((context+1)).accelerated_render(surface,quality,renddesc,cb)))
{
Surface clearsurface;
clearsurface.set_wh(renddesc.get_w(),renddesc.get_h());
Surface::alpha_pen apen(surface->begin());
apen.set_alpha(composite->get_amount());
- apen.set_blend_method(Color::BLEND_STRAIGHT);
+ apen.set_blend_method(composite->get_blend_method());
clearsurface.blit_to(apen);
}
Context context(*this);
while(!(context)->empty())
{
- // If this layer is active, then go
- // ahead and break out of the loop
- if((*context)->active() && !(*context)->dirty_time_.is_equal(time))
+ // If this layer is active, and
+ // it either isn't already set to the given time or
+ // it's a time loop layer,
+ // then break out of the loop and set its time
+ if((*context)->active() &&
+ (!(*context)->dirty_time_.is_equal(time) ||
+ (*context)->get_name() == "timeloop"))
break;
// Otherwise, we want to keep searching