Moving Background (DS Homebrew)

Discussion in 'NDS - Emulation and Homebrew' started by Ray =D, Oct 17, 2011.

  1. Ray =D
    OP

    Ray =D GBAtemp Regular

    Member
    288
    38
    May 17, 2011
    Gambia, The
    Yeah. For my Homebrew, I need a moving background. Can someone tell me ho I can let my background move?
     
  2. wasim

    wasim ♫ Music addict ♫

    Member
    907
    63
    Nov 13, 2010
    India
    Calicut
    what kind of homebrew ? :P
     
  3. Ray =D
    OP

    Ray =D GBAtemp Regular

    Member
    288
    38
    May 17, 2011
    Gambia, The
    Jump'n run :P But I need it on the sub screen always scrolling :)
     
  4. wasim

    wasim ♫ Music addict ♫

    Member
    907
    63
    Nov 13, 2010
    India
    Calicut
    good luck with that :)

    anyway try pm'ing Knightfox
    he'll be knowing it
     
  5. Ray =D
    OP

    Ray =D GBAtemp Regular

    Member
    288
    38
    May 17, 2011
    Gambia, The
    Ok thank you :)
     
  6. Dirbaio

    Dirbaio GBAtemp Regular

    Member
    158
    15
    Sep 26, 2010
    Spain
    Are you using LibNDS?

    If so you can use bgSetScroll(id, x, y) and then do bgUpdate()
    If you're using rotoscale/extended backgrounds then it gets a bit more complicated because there are more functions. There's an example on that that comes with devkitPro.

    I could help if you gave more details. What and how do you want to scroll exactly?
     
  7. Ray =D
    OP

    Ray =D GBAtemp Regular

    Member
    288
    38
    May 17, 2011
    Gambia, The
    I have a Bottom Screen (Yeah the nice game which I'm programming with CoolAs :P) and a Top Screen. On the top screen is a background. And this background should move always to the right.
    Would be "bgSetScroll(1, x++, y)" correct? And I am using LibNDS^^
     
  8. LeRodeur

    LeRodeur GBAtemp Regular

    Member
    162
    10
    Dec 12, 2009
    France
    You must increment x before and not in the function, ++is a function that will return 1or 0, depending on if the action on the variable has been done, so 1in 99.999%