Sprite Animation bug

Discussion in 'NDS - Emulation and Homebrew' started by sleight, Jan 21, 2009.

  1. sleight
    OP

    sleight Advanced Member

    Newcomer
    1
    Nov 23, 2008
    Gambia, The
    ok here's a veeeeeeery early beta of my 1st homebrew

    http://www.megaupload.com/?d=FIQVQ7D6

    Always the "load" sprite is bugged when i try to move my char..
    If i delete this sprite the character is bugged..

    anyone got any idea?

    thnks in advance
     
  2. JDandy

    JDandy GBAtemp Regular

    Member
    1
    Sep 22, 2008
    Netherlands
    Your source code would be more helpful.
    What are you using? PAlib?
    If so, do you have the palette set properly? etc etc.

    I don't think anyone can help you by looking at an .nds file
     
  3. sleight
    OP

    sleight Advanced Member

    Newcomer
    1
    Nov 23, 2008
    Gambia, The

    I guess the palette is ok and sprite seems to be loaded correctly too... (i think so because i tried with another sprite first before designin my own and it worked fine)
     
  4. JDandy

    JDandy GBAtemp Regular

    Member
    1
    Sep 22, 2008
    Netherlands
    Ok, having played it and taken a look at your code...

    //PA_DeleteSprite (0,1); is commented out by the // (like you said), so it's normal that that Load sprite stays on screen.

    There's this though:

    if(Pad.Newpress.Up) PA_StartSpriteAnim(0, 3, 4, 5, 6);
    if(Pad.Newpress.Down) PA_StartSpriteAnim(0, 6, 7, 8, 6);

    I just took a look, and PA_StartSpriteAnim goes (screen, sprite, frame, frame, speed)
    and your character sprite is number 2, so shouldn't it be;

    if(Pad.Newpress.Up) PA_StartSpriteAnim(0, 2, 4, 5, 6);
    if(Pad.Newpress.Down) PA_StartSpriteAnim(0, 2, 7, 8, 6);

    ?

    I think that might be your solution; it only glitches the load sprite when walking up/down, after all.


    Hope this solves it, it looks interesting!
    Good luck.
     
  5. sleight
    OP

    sleight Advanced Member

    Newcomer
    1
    Nov 23, 2008
    Gambia, The
    Yeah that fixed it !
    Thanks a lot =D
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice