|
|
@ -320,22 +320,22 @@ void plFont::IRenderString( plMipmap *mip, UInt16 x, UInt16 y, const wchar_t *st |
|
|
|
// Choose an optimal rendering function
|
|
|
|
// Choose an optimal rendering function
|
|
|
|
fRenderInfo.fRenderFunc = nil; |
|
|
|
fRenderInfo.fRenderFunc = nil; |
|
|
|
if( justCalc ) |
|
|
|
if( justCalc ) |
|
|
|
fRenderInfo.fRenderFunc = IRenderCharNull; |
|
|
|
fRenderInfo.fRenderFunc = &plFont::IRenderCharNull; |
|
|
|
else if( mip->GetPixelSize() == 32 ) |
|
|
|
else if( mip->GetPixelSize() == 32 ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if( fBPP == 1 ) |
|
|
|
if( fBPP == 1 ) |
|
|
|
fRenderInfo.fRenderFunc = ( fRenderInfo.fFlags & kRenderScaleAA ) ? IRenderChar1To32AA : IRenderChar1To32; |
|
|
|
fRenderInfo.fRenderFunc = ( fRenderInfo.fFlags & kRenderScaleAA ) ? &plFont::IRenderChar1To32AA : &plFont::IRenderChar1To32; |
|
|
|
else if( fBPP == 8 ) |
|
|
|
else if( fBPP == 8 ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if( fRenderInfo.fFlags & kRenderIntoAlpha ) |
|
|
|
if( fRenderInfo.fFlags & kRenderIntoAlpha ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if( ( fRenderInfo.fColor & 0xff000000 ) != 0xff000000 ) |
|
|
|
if( ( fRenderInfo.fColor & 0xff000000 ) != 0xff000000 ) |
|
|
|
fRenderInfo.fRenderFunc = IRenderChar8To32Alpha; |
|
|
|
fRenderInfo.fRenderFunc = &plFont::IRenderChar8To32Alpha; |
|
|
|
else |
|
|
|
else |
|
|
|
fRenderInfo.fRenderFunc = IRenderChar8To32FullAlpha; |
|
|
|
fRenderInfo.fRenderFunc = &plFont::IRenderChar8To32FullAlpha; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
fRenderInfo.fRenderFunc = IRenderChar8To32; |
|
|
|
fRenderInfo.fRenderFunc = &plFont::IRenderChar8To32; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -521,7 +521,7 @@ void plFont::IRenderString( plMipmap *mip, UInt16 x, UInt16 y, const wchar_t *st |
|
|
|
|
|
|
|
|
|
|
|
fRenderInfo.fX = 0; |
|
|
|
fRenderInfo.fX = 0; |
|
|
|
CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; |
|
|
|
CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; |
|
|
|
fRenderInfo.fRenderFunc = IRenderCharNull; |
|
|
|
fRenderInfo.fRenderFunc = &plFont::IRenderCharNull; |
|
|
|
|
|
|
|
|
|
|
|
IRenderLoop( string, lastWord ); |
|
|
|
IRenderLoop( string, lastWord ); |
|
|
|
|
|
|
|
|
|
|
@ -543,7 +543,7 @@ void plFont::IRenderString( plMipmap *mip, UInt16 x, UInt16 y, const wchar_t *st |
|
|
|
|
|
|
|
|
|
|
|
fRenderInfo.fX = 0; |
|
|
|
fRenderInfo.fX = 0; |
|
|
|
CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; |
|
|
|
CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; |
|
|
|
fRenderInfo.fRenderFunc = IRenderCharNull; |
|
|
|
fRenderInfo.fRenderFunc = &plFont::IRenderCharNull; |
|
|
|
|
|
|
|
|
|
|
|
IRenderLoop( string, lastWord ); |
|
|
|
IRenderLoop( string, lastWord ); |
|
|
|
|
|
|
|
|
|
|
@ -642,7 +642,7 @@ void plFont::IRenderString( plMipmap *mip, UInt16 x, UInt16 y, const wchar_t *st |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Advance left past any clipping area
|
|
|
|
// Advance left past any clipping area
|
|
|
|
CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; |
|
|
|
CharRenderFunc oldFunc = fRenderInfo.fRenderFunc; |
|
|
|
fRenderInfo.fRenderFunc = IRenderCharNull; |
|
|
|
fRenderInfo.fRenderFunc = &plFont::IRenderCharNull; |
|
|
|
while( fRenderInfo.fX < fRenderInfo.fClipRect.fX && *string != 0 ) |
|
|
|
while( fRenderInfo.fX < fRenderInfo.fClipRect.fX && *string != 0 ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
IRenderLoop( string, 1 ); |
|
|
|
IRenderLoop( string, 1 ); |
|
|
|