gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > DSGUI

#170221 - tine622 - Wed Sep 09, 2009 6:33 am

Hello,
I was using DSGUIv4 ( http://giesler.biz/bjoern/downloads/dsgui/ )in a program of mine. It is absolutely wonderful for what I am doing and since I've upgraded to the newest version of libnds, I haven't been able to get it to compile.

Ive tried all I can think of to get it to compile (I saw the deprecated header and that didn't solve all the problems)

I was wondering if anyone else has used this library and updated it to use the latest libnds or had any good advice on how to fix this?

Thanks,
Mark

#170226 - Drovor - Wed Sep 09, 2009 5:53 pm

I was able to get this to build by adding some includes to a few header files (for <stdio.h>, <string.h> and <algorithm>) and a few tweaks to BGUI.cpp, mainly:

/*// Removed this:
BG3_CR = BG_BMP16_256x256 | BG_BMP_BASE(8) | BG_PRIORITY(3);
BG3_XDX = 1 << 8;
BG3_XDY = 0;
BG3_YDX = 0;
BG3_YDY = 1 << 8;
BG3_CX = 0;
BG3_CY = 0;
*/

// Added this:
BACKGROUND.control[3] = BG_BMP16_256x256 | BG_BMP_BASE(8) | BG_PRIORITY(3);
BACKGROUND.bg3_rotation.xdx = 1 << 8;
BACKGROUND.bg3_rotation.xdy = 0;
BACKGROUND.bg3_rotation.ydx = 0;
BACKGROUND.bg3_rotation.ydy = 1 << 8;

A little later in the same file, I wasn't sure how this should be done so I commented them out to get it building:

if(consoleOnSub)
{
videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE);
vramSetBankC(VRAM_C_SUB_BG);
//SUB_BG0_CR = BG_MAP_BASE(31);
BG_PALETTE_SUB[255] = RGB15(31, 31, 31);
// consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(31),
// (u16*)CHAR_BASE_BLOCK_SUB(0),
// 16);
}

edit: I should probably mention I didn't test the resulting libDSGUI9.a file

#170232 - sverx - Thu Sep 10, 2009 10:24 am

Some #define has changed, so

- BG3_CR is now REG_BG3CNT
- BG3_XDX, BG3_XDY, BG3_YDX and BG3_YDY are now REG_BG3PA, REG_BG3PB, REG_BG3PC and REG_BG3PD

- SUB_BG0_CR is now REG_BG0CNT_SUB
... and you better use consoleDemoInit() instead of consoleInitDefault().

#170235 - Dwedit - Thu Sep 10, 2009 1:33 pm

Any particular reason why the server refuses to let me see the screenshots?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#170237 - samel - Thu Sep 10, 2009 6:27 pm

[quote="Dwedit"]Any particular reason why the server refuses to let me see the screenshots?[/quote]

Got the same problem