Results 1 to 2 of 2

Thread: CL_Sprite animation control in Clanlib 8.1

  1. #1

    Default CL_Sprite animation control in Clanlib 8.1

    First I want to say that Clanlib is great 2d engine. It has increased the performance of the game I'm writing by over 100%. Before I was using SDL alone, but now that there is OpenGL support, everything runs alot better.

    Here is the example I'm having a problem with. I've loaded a sprite from a resource file and I have the animation configured to play forward and loop. I use the set_image_data function on CL_Sprite to set the sprite data on the current sprite that I'm using. I want to switch the direction of the animation, but the call to set_play_backwards( true ) does not seem to work. The only way I can see to get this work, is to create a resource for a forward play and a backwards play. I don't want to have to do this, because my resource files are created by an animation program that I wrote. Has anyone run into this problem, or know of the correct way to use set_play_backwards?

  2. #2

    Default

    Nevermind, I figured out what I was doing wrong. Apparently the play backwards flag needs to be set, then you have to restart the animation. I would rather not have to restart the animation every time i switch the animation direction, but oh well, I'll change my code to work around this.

Similar Threads

  1. CL_Sprite mouse cursor
    By AlfaRed in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 02-11-2009, 09:29 AM
  2. cl_sprite with multiple frames
    By dwune in forum Official ClanLib SDK Forums
    Replies: 7
    Last Post: 08-29-2008, 08:49 AM
  3. odd control scheme help
    By Uhfgood in forum Novashell Game Creation System
    Replies: 2
    Last Post: 07-05-2008, 06:40 PM
  4. Simple Animation
    By ares in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 02-27-2008, 05:20 AM
  5. CL_Sprite problems
    By gmatt in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 06-29-2007, 05:38 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •