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: 49
  • Files.JPG
    Files.JPG
    37.6 KB · Views: 42

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • crafthp434 @ crafthp434:
    aroma
  • NinStar @ NinStar:
    in that case, there is no such thing as homebrew launcher for aroma
  • NinStar @ NinStar:
    you have to launch your homebrews directly from the wii u menu
  • NinStar @ NinStar:
    there is a plugin that display them on the wii u menu, pretty sure it is enabled by default
  • crafthp434 @ crafthp434:
    so like it doesnt exist
  • crafthp434 @ crafthp434:
    yeah
    ?
  • NinStar @ NinStar:
    it doesn't exist, at least not for aroma
  • crafthp434 @ crafthp434:
    ohhhhh
  • NinStar @ NinStar:
    on tiramisu you can access it by opening mii maker
  • crafthp434 @ crafthp434:
    okay
  • NinStar @ NinStar:
    I don't have a wii u anymore to test it myself, but if homebrews are not visible on the wii u menu I think you can press L + R + minus to open the plugin menu, there should be an option called "homebrews on wii u menu" or something similar
  • crafthp434 @ crafthp434:
    nope
  • crafthp434 @ crafthp434:
    it is L+dpad down+ select
  • crafthp434 @ crafthp434:
    but homebrew is appearing in the home menu btw
  • NinStar @ NinStar:
    yes, now I remember it
  • NinStar @ NinStar:
    then it is working, I also don't like that they did this but it is the only option you have if you are using aroma
  • crafthp434 @ crafthp434:
    i just didint know the homebrew launcher didint exist in aroma
  • crafthp434 @ crafthp434:
    thanks btw
  • Xdqwerty @ Xdqwerty:
    Im downloading fallout 3 goty edition
    +1
  • BigOnYa @ BigOnYa:
    I'm downloading more ram for my hamster pc
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    New hamster PC, with anal operation and BT connectivity!
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, How do I make enemies respawn on gdevelop after
    the player dies?
  • Psionic Roshambo @ Psionic Roshambo:
    Carrying a PC or phone is so old school!
  • Psionic Roshambo @ Psionic Roshambo:
    Squeeze your cheeks twice to answer calls!
    Psionic Roshambo @ Psionic Roshambo: Squeeze your cheeks twice to answer calls!