mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-17 18:12:01 +01:00
more tweaks to high-res drawing -- and don't call WinSetScalingMode
when it's not available!
This commit is contained in:
parent
81d8978226
commit
b3da969a47
2 changed files with 17 additions and 9 deletions
|
@ -305,10 +305,14 @@ palm_common_draw_drawCell( DrawCtx* p_dctx, XP_Rect* rect,
|
|||
if ( len > 0 ) {
|
||||
XP_S16 strWidth = FntCharsWidth( (const char*)letters, len );
|
||||
XP_U16 x = localR.left + ((localR.width-strWidth) / 2);
|
||||
XP_U16 y = localR.top-1;
|
||||
if ( len == 1 ) {
|
||||
++x;
|
||||
}
|
||||
WinDrawChars( (const char*)letters, len, x, localR.top-1 );
|
||||
if ( dctx->doHiRes ) {
|
||||
--y;
|
||||
}
|
||||
WinDrawChars( (const char*)letters, len, x, y );
|
||||
|
||||
showBonus = XP_FALSE;
|
||||
empty = XP_FALSE;
|
||||
|
@ -492,7 +496,7 @@ palm_draw_drawTile( DrawCtx* p_dctx, XP_Rect* rect,
|
|||
|
||||
if ( 0 ) {
|
||||
#ifdef FEATURE_HIGHRES
|
||||
} else if ( dctx->doHiRes ) {
|
||||
} else if ( dctx->doHiRes && dctx->oneDotFiveAvail ) {
|
||||
UInt32 oldMode = WinSetScalingMode( kTextScalingOff );
|
||||
FontID curFont = FntGetFont();
|
||||
FntSetFont( boldFont );
|
||||
|
@ -607,10 +611,16 @@ palm_draw_drawBoardArrow( DrawCtx* p_dctx, XP_Rect* rectP,
|
|||
XWBonusType cursorBonus, XP_Bool vertical )
|
||||
{
|
||||
PalmDrawCtx* dctx = (PalmDrawCtx*)p_dctx;
|
||||
RectangleType oldClip;
|
||||
|
||||
Int16 resID = vertical? DOWN_ARROW_RESID:RIGHT_ARROW_RESID;
|
||||
|
||||
WinGetClip( &oldClip );
|
||||
WinSetClip( (RectangleType*)rectP );
|
||||
|
||||
bitmapInRect( dctx, resID, rectP );
|
||||
|
||||
WinSetClip( &oldClip );
|
||||
} /* palm_draw_drawBoardArrow */
|
||||
|
||||
#ifdef COLOR_SUPPORT
|
||||
|
@ -921,8 +931,6 @@ palm_draw_score_pendingScore( DrawCtx* p_dctx, XP_Rect* rect, XP_S16 score,
|
|||
|
||||
HIGHRES_PUSH_LOC(dctx);
|
||||
|
||||
str = (*dctx->getResStrFunc)( dctx->globals, STR_PTS );
|
||||
|
||||
WinGetClip( &oldClip );
|
||||
RctGetIntersection( &oldClip, (RectangleType*)rect, &newClip );
|
||||
if ( newClip.extent.y > 0 ) {
|
||||
|
@ -1305,6 +1313,7 @@ palm_drawctxt_make( MPFORMAL GraphicsAbility able,
|
|||
}
|
||||
|
||||
dctx->fntHeight = FntBaseLine();
|
||||
dctx->oneDotFiveAvail = globals->oneDotFiveAvail;
|
||||
|
||||
return (DrawCtx*)dctx;
|
||||
} /* palm_drawctxt_make */
|
||||
|
|
|
@ -77,15 +77,12 @@ typedef struct PalmDrawCtx {
|
|||
#ifdef FEATURE_HIGHRES
|
||||
UInt16 oldCoord;
|
||||
XP_Bool doHiRes;
|
||||
XP_Bool oneDotFiveAvail;
|
||||
#endif
|
||||
|
||||
union {
|
||||
struct {
|
||||
/* IndexedColorType black; */
|
||||
/* IndexedColorType white; */
|
||||
/* IndexedColorType playerColors[MAX_NUM_PLAYERS]; */
|
||||
/* IndexedColorType bonusColors[BONUS_LAST-1]; */
|
||||
XP_U8 reserved; /* make CW compiler happy */
|
||||
XP_U8 reserved; /* make CW compiler happy */
|
||||
} clr;
|
||||
struct {
|
||||
CustomPatternType valuePatterns[4];
|
||||
|
@ -286,6 +283,8 @@ struct PalmAppGlobals {
|
|||
XP_U16 sonyLibRef;
|
||||
XP_Bool doVSK;
|
||||
XP_Bool hasHiRes;
|
||||
XP_Bool oneDotFiveAvail;
|
||||
XP_Bool useHiRes;
|
||||
#endif
|
||||
|
||||
#ifdef XWFEATURE_SEARCHLIMIT
|
||||
|
|
Loading…
Reference in a new issue