alright so i was working on the pa2lib library, i wanted to get the graphics working but i am dumb enought. I documented some of this stuff into my website (https://aerglass.github.io/PAlib-technical-docs/ to be exact, there isn't a link anywhere else on the internet)
i took at look at the pagfx stuff and the PAlib source code and i got a idea on what it is doing.
first of all what i did was copying and renaming the converted stuff, and imported it directly into a NFlib proyect, This worked really well. But to be honest this is what i am not here for, I wanted backwards compatibility with PAlib proyects.
the second thing i done was taking a look to the PAlib's source code and figured out how the hell did the PA_LoadBackground function worked, After I wasted 90 hours of my life trying to understand trash code I decided to directly take a random libnds example and directly dmaCopy all of that info into the vram, what i got was corrupted graphics.
the third thing i done was stealing source code from Fewnity (yeah, https://github.com/Fewnity/T-Rex-Runner-Game-Nintendo-DS) to see how the hell did tiled backgrounds worked in libnds. I directly dmaCopyied all of that including the gfx, map and pal, of the stuff that I needed, what i got was even more corrupted graphics than it already was.
the fourth and last thing i have done was stealing also code from pa2lib's loadbg function (which is directly pulled from nds_nflib) and remade the same function by replacing the nitrofiles with the graphics stored into RAM, it gave me tons of compiling errors saying that invalid convertion const void to file, i tried stealing grit stuff into my code but that breaks compatibility + it did not work.
yeah what i am supposed to do on here? i am pretty sure that mad devkitpro devs will rant on this post because i am supporting a outdated library from 2005.
i took at look at the pagfx stuff and the PAlib source code and i got a idea on what it is doing.
first of all what i did was copying and renaming the converted stuff, and imported it directly into a NFlib proyect, This worked really well. But to be honest this is what i am not here for, I wanted backwards compatibility with PAlib proyects.
the second thing i done was taking a look to the PAlib's source code and figured out how the hell did the PA_LoadBackground function worked, After I wasted 90 hours of my life trying to understand trash code I decided to directly take a random libnds example and directly dmaCopy all of that info into the vram, what i got was corrupted graphics.
the third thing i done was stealing source code from Fewnity (yeah, https://github.com/Fewnity/T-Rex-Runner-Game-Nintendo-DS) to see how the hell did tiled backgrounds worked in libnds. I directly dmaCopyied all of that including the gfx, map and pal, of the stuff that I needed, what i got was even more corrupted graphics than it already was.
the fourth and last thing i have done was stealing also code from pa2lib's loadbg function (which is directly pulled from nds_nflib) and remade the same function by replacing the nitrofiles with the graphics stored into RAM, it gave me tons of compiling errors saying that invalid convertion const void to file, i tried stealing grit stuff into my code but that breaks compatibility + it did not work.
yeah what i am supposed to do on here? i am pretty sure that mad devkitpro devs will rant on this post because i am supporting a outdated library from 2005.