Background wont scroll

MrMoneyBags100

Member
OP
Newcomer
Joined
Oct 1, 2021
Messages
5
Trophies
0
Age
21
XP
53
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: 21
  • Files.JPG
    Files.JPG
    37.6 KB · Views: 20

You may also like...

General chit-chat
Help Users
  • No one is chatting at the moment.
    M4x1mumReZ @ M4x1mumReZ: I thought he was going to use an actual PS4 to cook. +1