Background wont scroll

MrMoneyBags100

Member
OP
Newcomer
Joined
Oct 1, 2021
Messages
6
Trophies
0
Age
23
XP
117
Country
United Kingdom
Here it is, I am attempting to make my background scroll to give the effect of a moving sea and sky (the "art" is temporary)
when I compile it and try to load it on DeSmuMe it just sits there with no movement, I have had no luck finding any help from ancient tutorials on anything DS related.
Is there something simple I am missing?

I am using NFLib and have the syntax sheet open next to me and am reading to no avail

Code:
#include <iostream>
#include <nds.h>
#include <nf_lib.h>

int main(int argc, char **argv) {

    consoleDemoInit();
    consoleClear();
    setBrightness(3, 0);
    NF_SetRootFolder("NITROFS");
    
    NF_Set2D(0, 0);
    NF_Set2D(1, 0);
    
    NF_InitTiledBgBuffers();
    NF_InitTiledBgSys(0);
    NF_InitTiledBgSys(1);

    NF_LoadTiledBg("Backgrounds/BgSky", "Sky", 512, 256);
    NF_LoadTiledBg("Backgrounds/BgSea", "Sea", 512, 256);
    NF_LoadTiledBg("Backgrounds/ShipBg", "Ship", 256, 256);

    NF_CreateTiledBg(0, 3, "Sky");
    NF_CreateTiledBg(0, 2, "Sea");
    NF_CreateTiledBg(1, 2, "Ship");


    bool MenuState = true;
    int SeaX = 0;
    int SkyX = 0;
    NF_ScrollBg(0, 3, SeaX, 0);
    NF_ScrollBg(0, 2, SkyX, 0);

    while (MenuState)
    {
        SeaX++;
        SkyX++;
        NF_ScrollBg(0, 3, SeaX, 0);
        NF_ScrollBg(0, 2, SkyX, 0);

        NF_SpriteOamSet(0);
        NF_SpriteOamSet(1);
        swiWaitForVBlank();
        oamUpdate(&oamMain);
        oamUpdate(&oamSub);

    }


    return 0;

}
 

Attachments

  • Emu.JPG
    Emu.JPG
    29.8 KB · Views: 42
  • Files.JPG
    Files.JPG
    37.6 KB · Views: 37

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • K3Nv2 @ K3Nv2:
    Fish wire
  • Xdqwerty @ Xdqwerty:
    What's going on?
  • Xdqwerty @ Xdqwerty:
    I'm a fuckin stupid, a stupid, a stupid, a stupid, a stupid, a stupid, a stupid,
  • K3Nv2 @ K3Nv2:
    It's okay we're all stupid on the inside
  • Xdqwerty @ Xdqwerty:
    My damn brain forgets everything
  • Xdqwerty @ Xdqwerty:
    I know nothing about anything
  • BakerMan @ BakerMan:
    hell, i'm stupid on the outside
  • Xdqwerty @ Xdqwerty:
    The only things in my mind are useless stuff
  • K3Nv2 @ K3Nv2:
    @Xdqwerty Use Google to your advantages 90% of the time it has answers for hardware and software
  • Xdqwerty @ Xdqwerty:
    But that stuff should be in my mind, not on the internet
  • K3Nv2 @ K3Nv2:
    No it really shouldn't none of us know everything
    +1
  • Xdqwerty @ Xdqwerty:
    I'll maybe slam my head until i become smarter
  • Xdqwerty @ Xdqwerty:
    Good night
  • wolffangalchemist @ wolffangalchemist:
    as a child i ate crayons, i feel like i have come a long way since then.
    +1
  • K3Nv2 @ K3Nv2:
    I shoved rocks in my ear
  • BakerMan @ BakerMan:
    ngl i find it hilarious when a new twitch streamer blows up
  • BakerMan @ BakerMan:
    bc then all the memes are about them, for better (like caseoh) or for worse (like kai cenat)
  • K3Nv2 @ K3Nv2:
    I like it when they get canceled over flashing a tit
  • BakerMan @ BakerMan:
    some guy got banned forever for saying "l ratio" or smth, and a woman gets it on stream and gets banned for a week
  • BakerMan @ BakerMan:
    like what the fuck
  • K3Nv2 @ K3Nv2:
    We need to ban man nipples from being on the internet but female ones should be fine
    +1
  • BakerMan @ BakerMan:
    lmao
  • BakerMan @ BakerMan:
    pokimane gets naked, "AWOOOGA!", case gets naked, and he gets a taste of his own medicine lmao
  • BakerMan @ BakerMan:
    actually, it still may be an "AWOOOGA!" from his chat remembering some of the messages he gets
    BakerMan @ BakerMan: actually, it still may be an "AWOOOGA!" from his chat remembering some of the messages he gets