Does the Nintendo DS not provide a feature for blending layers? In some old tutorials I've read something about BLEND_CR and different blend defines, I might use, but in the current libnds documentation there's not even a word of blending (except for the ObjBlendMode, but it's nowhere explained).
Should I "redefine" those registers myself to use the feature, or what should I do?
Is that tutorial "false"?
Alpha Blending (Layers or Sprites)
-
- Posts: 84
- Joined: Sun Apr 11, 2010 10:43 am
Re: Alpha Blending (Layers or Sprites)
the libnds documentations arent the final word on the libnds features.
libnds features arent the final word on nds features.
libnds contains REG_BLDCNT, REG_BLDY, and REG_BLDALPHA. study the operations of these regs on gbatek
libnds features arent the final word on nds features.
libnds contains REG_BLDCNT, REG_BLDY, and REG_BLDALPHA. study the operations of these regs on gbatek
Re: Alpha Blending (Layers or Sprites)
Looking at the sprite code in libnds, I see this...
Unless I'm mistaken, this is the only part of the source code that seems to alter "blendMode", for which it only ever gets set to "SpriteColorFormat_Bmp". Of the available enum values for "SpriteColorFormat", there are these 3...
Semi-Transparent and Windowing mode are absent.
Code: Select all
void oamSet(OamState* oam, int id, int x, int y, int priority,
int palette_alpha, SpriteSize size,SpriteColorFormat format,
const void* gfxOffset,
int affineIndex,
bool sizeDouble, bool hide, bool hflip, bool vflip, bool mosaic) {
.
.
.
if(format != SpriteColorFormat_Bmp) {
oam->oamMemory[id].colorMode = format;
} else {
oam->oamMemory[id].blendMode = format;
oam->oamMemory[id].colorMode = 0;
}
.
.
.
Code: Select all
SpriteColorFormat_16Color = OBJCOLOR_16,/**< 16 colors per sprite*/
SpriteColorFormat_256Color = OBJCOLOR_256,/**< 256 colors per sprite*/
SpriteColorFormat_Bmp = OBJMODE_BITMAP/**< 16-bit sprites*/
Re: Alpha Blending (Layers or Sprites)
Hm, I have to use an additional lib then? Have I to study new functions and such? I'd like to use features nothing to do with "GL", if possible ^^
Ah, thanks, that might be the registers helping me out. I've read in old tutorials about "BLEND_CR", but that isn't any longer in the new version, because registers now begin with "REG_".zeromus wrote:the libnds documentations arent the final word on the libnds features.
libnds features arent the final word on nds features.
libnds contains REG_BLDCNT, REG_BLDY, and REG_BLDALPHA. study the operations of these regs on gbatek
I'll try out about these.
Re: Alpha Blending (Layers or Sprites)
Okay, thanks. I've tested different values, with the help of gbatek, and I quite got what I wanted.zeromus wrote:the libnds documentations arent the final word on the libnds features.
libnds features arent the final word on nds features.
libnds contains REG_BLDCNT, REG_BLDY, and REG_BLDALPHA. study the operations of these regs on gbatek
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 4 guests