bugWarmux - Bugs: bug #10707, Bad Sprite constructor

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #10707: Bad Sprite constructor

Submitted by:  Yannig <drayan>
Submitted on:  Mon 07 Jan 2008 08:09:46 PM UTC  
Category: DisplaySeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Yannig <drayan>Open/Closed: Closed
Release: svn

Sat 12 Jan 2008 06:12:05 PM UTC, SVN revision 3881:

[bug #10707] Bad Sprite constructor. Fix sprite animation of wind particle.

(Browse SVN revision 3881)

Yannig <drayan>
Project AdministratorIn charge of this item.
Tue 08 Jan 2008 11:31:00 AM UTC, comment #1:

Hi people, so here's my clipboard of the day.

in sprite.cpp :
Sprite::Sprite(const Sprite &other) :
animation(other.animation, *this),
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++)


and in wind.cpp :

sprite = new Sprite(*tmp);
sprite->SetCurrentFrame ( randomObj.GetLong(0, sprite->GetFrameCount()-1));

tmp->Scale(-scale, scale);
flipped = new Sprite(*tmp);
flipped->SetCurrentFrame ( randomObj.GetLong(0, sprite->GetFrameCount()-1));
flipped = NULL;

Have a good time !

Yannig <drayan>
Project AdministratorIn charge of this item.
Mon 07 Jan 2008 08:09:46 PM UTC, original submission:

Wind particle are not animated since we keep only the first frame.

In sprite.cpp, line 86, we use a constructor with the Surface. If we try to use a Sprite, we get an error => Error while using a sprite constructor initialized with another sprite.

Yannig <drayan>
Project AdministratorIn charge of this item.


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by gentildemon (Updated the item)
  • -unavailable- added by drayan (Submitted the item)

    Error: not logged in



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 14 Jan 2008 09:58:54 PM UTCgentildemonStatusReady For Test=>Fixed
    Sat 12 Jan 2008 06:12:29 PM UTCdrayanStatusIn Progress=>Ready For Test
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup