[libnds] VRAM B Enumeration, suggested change
Posted: Wed Sep 16, 2009 6:33 pm
The current enumeration for VRAM B's modes in video.h are:
VRAM_B_MAIN_SPRITE is currently defined with a VRAM_OFFSET(1) which makes the assumption that you're also using Bank A for Sprites as well, 256KB for Sprites... I would remove the VRAM_OFFSET(1) for this entry, at least it makes more sense to me. Of course you can use VRAM_B_MAIN_SPRITE_0x06400000 in your code, but since VRAM_B_MAIN_SPRITE seems to be some kind of default, it makes the most sense to me to do away with the offset.
Code: Select all
typedef enum {
VRAM_B_LCD = 0,
VRAM_B_MAIN_BG = 1 | VRAM_OFFSET(1),
VRAM_B_MAIN_BG_0x06000000 = 1 | VRAM_OFFSET(0),
VRAM_B_MAIN_BG_0x06020000 = 1 | VRAM_OFFSET(1),
VRAM_B_MAIN_BG_0x06040000 = 1 | VRAM_OFFSET(2),
VRAM_B_MAIN_BG_0x06060000 = 1 | VRAM_OFFSET(3),
VRAM_B_MAIN_SPRITE = 2 | VRAM_OFFSET(1),
VRAM_B_MAIN_SPRITE_0x06400000 = 2,
VRAM_B_MAIN_SPRITE_0x06420000 = 2 | VRAM_OFFSET(1),
VRAM_B_TEXTURE = 3 | VRAM_OFFSET(1),
VRAM_B_TEXTURE_SLOT0 = 3 | VRAM_OFFSET(0),
VRAM_B_TEXTURE_SLOT1 = 3 | VRAM_OFFSET(1),
VRAM_B_TEXTURE_SLOT2 = 3 | VRAM_OFFSET(2),
VRAM_B_TEXTURE_SLOT3 = 3 | VRAM_OFFSET(3)
} VRAM_B_TYPE;