Follow-up Comment #1, bug #10707 (project wormux):
Hi people, so here's my clipboard of the day.
in sprite.cpp :
...
Sprite::Sprite(const Sprite &other) :
cache(*this),
animation(other.animation, *this),
frames()
{
Constructor();
current_surface = Surface(other.current_surface);
show = other.show;
current_frame = other.current_frame;
frame_width_pix = other.frame_width_pix;
frame_height_pix = other.frame_height_pix;
alpha = other.alpha;
scale_x = other.scale_x;
scale_y = other.scale_y;
rotation_rad = other.rotation_rad;
rhs_pos = other.rhs_pos;
rot_hotspot = other.rot_hotspot;
rotation_point = other.rotation_point;
for(unsigned int f=0;f<other.frames.size();f++)
AddFrame(other.frames[f].surface,other.frames[f].delay);
if(other.cache.have_lastframe_cache)
cache.EnableLastFrameCache();
if(other.cache.have_rotation_cache)
EnableRotationCache(other.cache.rotation_cache_size);
if(other.cache.have_flipping_cache)
EnableFlippingCache();
}
...
and in wind.cpp :
...
sprite = new Sprite(*tmp);
sprite->SetAlpha(scale);
sprite->SetCurrentFrame ( randomObj.GetLong(0,
sprite->GetFrameCount()-1));
if(ActiveMap().GetWind().need_flip)
{
tmp->Scale(-scale, scale);
tmp->RefreshSurface();
flipped = new Sprite(*tmp);
flipped->SetAlpha(scale);
flipped->SetCurrentFrame ( randomObj.GetLong(0,
sprite->GetFrameCount()-1));
}
else
flipped = NULL;
...
Have a good time !
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?10707>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wormux-gna mailing list
[email protected]
https://mail.gna.org/listinfo/wormux-gna