fix non-high-res build so compiles again

This commit is contained in:
ehouse 2004-11-17 03:54:35 +00:00
parent c23ca0c1f6
commit 5dd17b4729
2 changed files with 35 additions and 13 deletions

View file

@ -315,9 +315,11 @@ palm_common_draw_drawCell( DrawCtx* p_dctx, XP_Rect* rect,
if ( len == 1 ) {
++x;
}
#ifdef FEATURE_HIGHRES
if ( dctx->doHiRes ) {
--y;
}
#endif
WinDrawChars( (const char*)letters, len, x, y );
showBonus = XP_FALSE;
@ -965,17 +967,23 @@ palm_draw_score_pendingScore( DrawCtx* p_dctx, XP_Rect* rect, XP_S16 score,
/* There's no room for the pts string if we're in highres mode and
WinSetScalingMode isn't available. */
if ( !dctx->doHiRes || dctx->oneDotFiveAvail ) {
XP_UCHAR* str = (*dctx->getResStrFunc)( dctx->globals, STR_PTS );
#ifdef FEATURE_HIGHRES
if ( !dctx->doHiRes || dctx->oneDotFiveAvail )
#endif
{
XP_UCHAR* str = (*dctx->getResStrFunc)( dctx->globals, STR_PTS );
if ( dctx->oneDotFiveAvail ) {
smallBoldStringAt( (const char*)str, XP_STRLEN((const char*)str),
x, rect->top );
} else {
WinDrawChars( (const char*)str,
XP_STRLEN((const char*)str), x, rect->top );
if ( 0 ) {
#ifdef FEATURE_HIGHRES
} else if ( dctx->oneDotFiveAvail ) {
smallBoldStringAt( (const char*)str, XP_STRLEN((const char*)str),
x, rect->top );
#endif
} else {
WinDrawChars( (const char*)str,
XP_STRLEN((const char*)str), x, rect->top );
}
}
}
WinDrawChars( buf, PENDING_DIGITS, x,
rect->top + (rect->height/2) - 1 );
@ -1334,7 +1342,9 @@ palm_drawctxt_make( MPFORMAL GraphicsAbility able,
}
dctx->fntHeight = FntBaseLine();
#ifdef FEATURE_HIGHRES
dctx->oneDotFiveAvail = globals->oneDotFiveAvail;
#endif
return (DrawCtx*)dctx;
} /* palm_drawctxt_make */

View file

@ -342,7 +342,11 @@ positionBoard( PalmAppGlobals* globals )
XP_U16 timerWidth, timerLeft;
XP_U16 freeSpaceH;
XP_Bool showGrid = globals->gState.showGrid;
XP_U16 doubler = globals->useHiRes? 2:1;
XP_U16 doubler =
#ifdef FEATURE_HIGHRES
globals->useHiRes? 2:
#endif
1;
#ifdef SHOW_PROGRESS
RectangleType bounds;
#endif
@ -370,9 +374,11 @@ positionBoard( PalmAppGlobals* globals )
}
scale = scale * doubler;
scaleV = scaleH = scale;
#ifdef FEATURE_HIGHRES
if ( globals->useHiRes ) {
scaleV -= 2;
}
#endif
freeSpaceH = ((PALM_MAX_COLS-nCols)/2) * scaleH;
if ( isLefty ) {
@ -440,16 +446,22 @@ positionBoard( PalmAppGlobals* globals )
globals->needsScrollbar = false; /* default */
boardHeight = scaleV * nCols;
if ( globals->useHiRes ) {
if ( 0 ) {
#ifdef FEATURE_HIGHRES
} else if ( globals->useHiRes ) {
trayTop = ((160 - TRAY_HEIGHT_HR) * doubler) - 1;
globals->needsScrollbar = false;
#endif
} else {
trayTop = 160 - TRAY_HEIGHT_LR;
globals->needsScrollbar = showGrid && (nCols == PALM_MAX_COLS);
}
trayScaleV = globals->useHiRes?
(TRAY_HEIGHT_HR*doubler) + 1:TRAY_HEIGHT_LR;
trayScaleV =
#ifdef FEATURE_HIGHRES
globals->useHiRes? (TRAY_HEIGHT_HR*doubler) + 1:
#endif
TRAY_HEIGHT_LR;
board_setTrayLoc( globals->game.board,
(isLefty? PALM_TRAY_LEFT_LH:PALM_TRAY_LEFT_RH) * doubler,
trayTop,