mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-17 18:12:01 +01:00
Remove HIGHRES compile-time tests: all palm releases will have HIGHRES
support now; build in different directories.
This commit is contained in:
parent
3da83805cc
commit
3388fc9f7b
6 changed files with 68 additions and 165 deletions
|
@ -15,45 +15,60 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
PLATFORM=palm
|
||||
LANG=en_US
|
||||
ROOTNAME = Crosswords
|
||||
BITMAPS = ./bmps
|
||||
NAME ?= "Crosswords"
|
||||
TYPE = appl
|
||||
ICONTEXT ?= "Crosswords"
|
||||
PLATFORM=obj_palm
|
||||
|
||||
ifeq ($(MEMDEBUG),TRUE)
|
||||
PLATFORM := $(PLATFORM)_memdebug
|
||||
CFLAGS += -DMEM_DEBUG -DDEBUG -g -O0
|
||||
CSFLAGS += -O0 -g
|
||||
NAME = "CrossDbg"
|
||||
ICONTEXT = "CrossDbg"
|
||||
APPID ?= Xwdb
|
||||
else
|
||||
PLATFORM := $(PLATFORM)_rel
|
||||
CFLAGS += -O2 -fomit-frame-pointer
|
||||
# The -Os flag breaks multilink, at least as I'm using it
|
||||
CSFLAGS += -OS -fomit-frame-pointer
|
||||
NAME = "Crosswords"
|
||||
ICONTEXT = "Crosswords"
|
||||
APPID ?= Xwr4
|
||||
endif
|
||||
|
||||
LANG=en_US
|
||||
ROOTNAME = $(NAME)
|
||||
BITMAPS = ./bmps
|
||||
TYPE = appl
|
||||
MLPREFIX = /usr
|
||||
DICT = $(shell echo $$BASENG_PATH)
|
||||
|
||||
ARCH ?= ARM_ONLY
|
||||
|
||||
ifeq ($(ARCH),ARM_ONLY)
|
||||
PLATFORM := $(PLATFORM)_armonly
|
||||
BUILD_AS_PNOLET = 1
|
||||
FEATURE_HIGHRES = -DFEATURE_HIGHRES
|
||||
TARGET=$(PLATFORM)/xw4_ARM.prc
|
||||
else
|
||||
ifeq ($(ARCH),68K_ONLY)
|
||||
FEATURE_HIGHRES = -DFEATURE_HIGHRES
|
||||
PLATFORM := $(PLATFORM)_68konly
|
||||
TARGET=$(PLATFORM)/xw4_68K.prc
|
||||
else
|
||||
ifeq ($(ARCH),SONY)
|
||||
# No highres in sony build case
|
||||
PLATFORM := $(PLATFORM)_sony
|
||||
BUILD_AS_PNOLET = 1
|
||||
FEATURE_PNOAND68K = -DFEATURE_PNOAND68K
|
||||
TARGET=$(PLATFORM)/xw4_SONY.prc
|
||||
else
|
||||
ifeq ($(ARCH),COMBINED)
|
||||
PLATFORM := $(PLATFORM)_combined
|
||||
BUILD_AS_PNOLET = 1
|
||||
FEATURE_PNOAND68K = -DFEATURE_PNOAND68K
|
||||
FEATURE_HIGHRES = -DFEATURE_HIGHRES
|
||||
TARGET=$(PLATFORM)/xwords4.prc
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
DEBUG_SET = APPID=Xwdb ICONTEXT="CrossDbg" NAME="CrossDbg" DONT_OMIT=true
|
||||
|
||||
APPNAME = "$(NAME)"
|
||||
|
||||
|
@ -117,8 +132,6 @@ else
|
|||
MYDEFS_COMMON += -DIR_SUPPORT -DIR_EXCHMGR
|
||||
endif
|
||||
|
||||
MYDEFS_COMMON += $(FEATURE_HIGHRES)
|
||||
|
||||
MYDEFS_ARM = -D__LITTLE_ENDIAN -DXW_TARGET_PNO $(MYDEFS_COMMON)
|
||||
MYDEFS_68K = -DPLATFORM_PALM -D__BIG_ENDIAN $(MYDEFS_COMMON) -DAPPNAME=\"$(APPNAME)\"
|
||||
|
||||
|
@ -148,12 +161,10 @@ ifneq (x$(HS_DUO_SUPPORT)x, xx)
|
|||
FNAVS = ./fnav03e9.bin
|
||||
endif
|
||||
|
||||
ifneq (x$(FEATURE_HIGHRES)x, xx)
|
||||
INCLUDES += -I/usr/local/share/palmdev/sdk-5r3/include/SonyIncs
|
||||
INCLUDES += -I/usr/local/share/palmdev/sdk-5r3/include/SonyIncs/System
|
||||
INCLUDES += -I/usr/local/share/palmdev/sdk-5r3/include/SonyIncs/Libraries
|
||||
MYDEFS_68K += -DCPU_TYPE=CPU_68K
|
||||
endif
|
||||
INCLUDES += -I/usr/local/share/palmdev/sdk-5r3/include/SonyIncs
|
||||
INCLUDES += -I/usr/local/share/palmdev/sdk-5r3/include/SonyIncs/System
|
||||
INCLUDES += -I/usr/local/share/palmdev/sdk-5r3/include/SonyIncs/Libraries
|
||||
MYDEFS_68K += -DCPU_TYPE=CPU_68K
|
||||
|
||||
include ../common/config.mk
|
||||
|
||||
|
@ -191,14 +202,10 @@ MYDEFS_ARM += $(FEATURE_PNOAND68K)
|
|||
|
||||
include ../common/rules.mk
|
||||
|
||||
CSFLAGS = -O2 -g -S -Wall -DAPPID=\'$(APPID)\' $(MYDEFS_68K) $(INCLUDES)
|
||||
CFLAGS = -O2 -g -Wall -DAPPID=\'$(APPID)\' $(MYDEFS_68K) $(INCLUDES)
|
||||
CSFLAGS += -S -Wall -DAPPID=\'$(APPID)\' $(MYDEFS_68K) $(INCLUDES)
|
||||
CFLAGS += -Wall -DAPPID=\'$(APPID)\' $(MYDEFS_68K) $(INCLUDES)
|
||||
# In the non-debug mode (for which DONT_OMIT is undefined) build without
|
||||
# the frame pointer.
|
||||
ifneq ($(DONT_OMIT), true)
|
||||
CSFLAGS += -fomit-frame-pointer
|
||||
CFLAGS += -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
$(TARGET): $(PLATFORM)/objs.prc $(PLATFORM)/res.prc
|
||||
$(PAR) -c -a 'resource|backup' -v 4 $@ $(NAME) $(TYPE) $(APPID) $^
|
||||
|
@ -211,12 +218,6 @@ endif
|
|||
solo:
|
||||
$(MAKE) XWFEATURE_STANDALONE_ONLY=1
|
||||
|
||||
debug:
|
||||
$(MAKE) PASSTHRU="-DDEBUG" $(DEBUG_SET)
|
||||
|
||||
memdebug:
|
||||
$(MAKE) PASSTHRU="-DDEBUG -DMEM_DEBUG" $(DEBUG_SET)
|
||||
|
||||
gremlins:
|
||||
$(MAKE) PASSTHRU="-DDEBUG -DMEM_DEBUG -DFOR_GREMLINS" DONT_OMIT=true
|
||||
|
||||
|
@ -281,7 +282,7 @@ ifneq (x$(BUILD_AS_PNOLET)x, xx)
|
|||
.PHONY : pnolet
|
||||
|
||||
pnolet: LocalizedStrIncludes.h
|
||||
$(MAKE) -f Makefile.PNO MYDEFS="$(MYDEFS_ARM) -DAPPID=\'$(APPID)\' \
|
||||
$(MAKE) -f Makefile.PNO MEMDEBUG=$(MEMDEBUG) MYDEFS="$(MYDEFS_ARM) -DAPPID=\'$(APPID)\' \
|
||||
-DAPPNAME=\\\"$(APPNAME)\\\""
|
||||
endif
|
||||
|
||||
|
@ -307,9 +308,8 @@ endif
|
|||
# mv code0001.tmp.grc $@ ; rm *.tmp.grc
|
||||
|
||||
help:
|
||||
@echo make [ARCH=(ARM_ONLY|68K_ONLY|SONY|COMBINED)]
|
||||
@echo make memdebug OR
|
||||
@echo make LANG=en_US OR
|
||||
@echo make ship-all OR
|
||||
@echo make gremlins OR
|
||||
@echo make clean
|
||||
@echo "make [ARCH=(ARM_ONLY|68K_ONLY|SONY|COMBINED)] [MEMDEBUG=TRUE] [LANG=fr_FR|en_US|es_ES|es_CT|sv_SE|de_DE] [clean]"
|
||||
@echo OR
|
||||
@echo "make ship-all"
|
||||
@echo OR
|
||||
@echo "make gremlins"
|
||||
|
|
|
@ -46,67 +46,48 @@ BITMAP ID SHOWTRAY_BUTTON_BMP_RES_ID "bmps/showtray.pbitm" AUTOCOMPRESS
|
|||
BITMAP ID DOWN_ARROW_RESID AUTOCOMPRESS
|
||||
BEGIN
|
||||
BITMAP "bmps/downarrow.pbitm" BPP 1 DENSITY 72
|
||||
#ifdef FEATURE_HIGHRES
|
||||
BITMAP "bmps/downarrowhd.pbitm" BPP 1 DENSITY 144
|
||||
#endif
|
||||
END
|
||||
|
||||
BITMAP ID RIGHT_ARROW_RESID AUTOCOMPRESS
|
||||
BEGIN
|
||||
BITMAP "bmps/rightarrow.pbitm" BPP 1 DENSITY 72
|
||||
#ifdef FEATURE_HIGHRES
|
||||
BITMAP "bmps/rightarrowhd.pbitm" BPP 1 DENSITY 144
|
||||
#endif
|
||||
END
|
||||
|
||||
/* bitmap family for inclding highres version */
|
||||
BITMAP ID TRAY_BUTTONS_BMP_RES_ID AUTOCOMPRESS
|
||||
BEGIN
|
||||
BITMAP "bmps/traybuttons.pbitm" BPP 1 DENSITY 72
|
||||
#ifdef FEATURE_HIGHRES
|
||||
BITMAP "bmps/traybuttonshd.pbitm" BPP 1 DENSITY 144
|
||||
#endif
|
||||
END
|
||||
|
||||
BITMAP ID STAR_BMP_RES_ID AUTOCOMPRESS
|
||||
BEGIN
|
||||
BITMAP "bmps/startmark.pbitm" BPP 1 DENSITY 72
|
||||
#ifdef FEATURE_HIGHRES
|
||||
BITMAP "bmps/startmarkhd.pbitm" BPP 1 DENSITY 144
|
||||
#endif
|
||||
END
|
||||
|
||||
BITMAP ID FLIP_BUTTON_BMP_RES_ID AUTOCOMPRESS
|
||||
BEGIN
|
||||
BITMAP "bmps/flipbutton.pbitm" BPP 1 DENSITY 72
|
||||
#ifdef FEATURE_HIGHRES
|
||||
BITMAP "bmps/flipbuttonhd.pbitm" BPP 1 DENSITY 144
|
||||
#endif
|
||||
END
|
||||
|
||||
BITMAP ID HINT_BUTTON_BMP_RES_ID AUTOCOMPRESS
|
||||
BEGIN
|
||||
BITMAP "bmps/lightbulb.pbitm" BPP 1 DENSITY 72
|
||||
#ifdef FEATURE_HIGHRES
|
||||
BITMAP "bmps/lightbulbhd.pbitm" BPP 1 DENSITY 144
|
||||
#endif
|
||||
END
|
||||
|
||||
BITMAP ID VALUE_BUTTON_BMP_RES_ID AUTOCOMPRESS
|
||||
BEGIN
|
||||
BITMAP "bmps/valuebutton.pbitm" BPP 1 DENSITY 72
|
||||
#ifdef FEATURE_HIGHRES
|
||||
BITMAP "bmps/valuebuttonhd.pbitm" BPP 1 DENSITY 144
|
||||
#endif
|
||||
END
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
# define TBH TRAY_BUTTON_HEIGHT_HR
|
||||
# define TBY TRAY_BUTTONS_Y_HR
|
||||
#else
|
||||
# define TBH TRAY_BUTTON_HEIGHT_LR
|
||||
# define TBY TRAY_BUTTONS_Y_LR
|
||||
#endif
|
||||
#define TBH TRAY_BUTTON_HEIGHT_HR
|
||||
#define TBY TRAY_BUTTONS_Y_HR
|
||||
|
||||
FORM ID XW_MAIN_FORM AT (0 0 160 160)
|
||||
USABLE
|
||||
|
|
|
@ -56,7 +56,6 @@ static void palm_clr_draw_clearRect( DrawCtx* p_dctx, const XP_Rect* rectP );
|
|||
static void palm_draw_drawMiniWindow( DrawCtx* p_dctx, const XP_UCHAR* text,
|
||||
const XP_Rect* rect, void** closureP );
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
#define HIGHRES_PUSH_LOC( dctx ) \
|
||||
{ \
|
||||
XP_U16 oldVal = 0; \
|
||||
|
@ -83,13 +82,6 @@ static void palm_draw_drawMiniWindow( DrawCtx* p_dctx, const XP_UCHAR* text,
|
|||
(void)WinSetCoordinateSystem( (dctx)->oldCoord ); \
|
||||
(dctx)->oldCoord = 0; \
|
||||
}
|
||||
#else
|
||||
#define HIGHRES_PUSH(dctx)
|
||||
#define HIGHRES_PUSH_LOC(dctx)
|
||||
#define HIGHRES_PUSH_NOPOP(dctx)
|
||||
#define HIGHRES_POP(dctx)
|
||||
#define HIGHRES_POP_LOC(dctx)
|
||||
#endif
|
||||
|
||||
static void
|
||||
eraseRect( /* PalmDrawCtx* dctx, */const XP_Rect* rect )
|
||||
|
@ -188,14 +180,12 @@ measureFace( PalmDrawCtx* dctx, XP_UCHAR face, PalmFontHtInfo* fhi )
|
|||
(void)WinSetDrawWindow( oldWin );
|
||||
WinDeleteWindow( win, false );
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
/* There should be a way to avoid this, but HIGHRES_PUSH after
|
||||
WinSetDrawWindow isn't working... Fix this... */
|
||||
if ( dctx->doHiRes ) {
|
||||
top *= 2;
|
||||
bottom *= 2;
|
||||
}
|
||||
#endif
|
||||
|
||||
fhi->topOffset = top;
|
||||
fhi->height = bottom - top + 1;
|
||||
|
@ -458,6 +448,8 @@ palm_common_draw_drawCell( DrawCtx* p_dctx, const XP_Rect* rect,
|
|||
}
|
||||
} else if ( !!bitmap ) {
|
||||
XP_Bool doColor = (able == COLOR) && (owner >= 0);
|
||||
XP_U16 x = localR.left+1;
|
||||
XP_U16 y = localR.top+1;
|
||||
/* cheating again; this belongs in a palm_clr method. But the
|
||||
special bitmaps are rare enough that we shouldn't change the palm
|
||||
draw state every time. */
|
||||
|
@ -465,7 +457,13 @@ palm_common_draw_drawCell( DrawCtx* p_dctx, const XP_Rect* rect,
|
|||
WinSetForeColor(
|
||||
dctx->drawingPrefs->drawColors[COLOR_PLAYER1+owner] );
|
||||
}
|
||||
WinDrawBitmap( (BitmapPtr)bitmap, localR.left+1, localR.top+1 );
|
||||
|
||||
if ( dctx->doHiRes ) {
|
||||
++x;
|
||||
++y;
|
||||
}
|
||||
|
||||
WinDrawBitmap( (BitmapPtr)bitmap, x, y );
|
||||
if ( doColor ) {
|
||||
WinSetForeColor( dctx->drawingPrefs->drawColors[COLOR_BLACK] );
|
||||
}
|
||||
|
@ -488,12 +486,10 @@ palm_common_draw_drawCell( DrawCtx* p_dctx, const XP_Rect* rect,
|
|||
r.topLeft.x = localR.left + ((PALM_BOARD_SCALE-1)/2);
|
||||
r.topLeft.y = localR.top + ((PALM_BOARD_SCALE-1)/2);
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
if ( dctx->doHiRes ) {
|
||||
r.topLeft.x += PALM_BOARD_SCALE/2;
|
||||
r.topLeft.y += PALM_BOARD_SCALE/2;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( globals->romVersion >= 35 ) {
|
||||
WinDrawPixel( r.topLeft.x, r.topLeft.y );
|
||||
|
@ -582,7 +578,6 @@ palm_bnw_draw_trayFinished( DrawCtx* p_dctx )
|
|||
WinSetClip( &dctx->oldTrayClip );
|
||||
} /* palm_draw_trayFinished */
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
static void
|
||||
smallBoldStringAt( const char* str, XP_U16 len, XP_S16 x, XP_U16 y )
|
||||
{
|
||||
|
@ -600,7 +595,6 @@ smallBoldStringAt( const char* str, XP_U16 len, XP_S16 x, XP_U16 y )
|
|||
FntSetFont( curFont );
|
||||
WinSetScalingMode( oldMode );
|
||||
} /* smallBoldStringAt */
|
||||
#endif
|
||||
|
||||
static void
|
||||
palm_draw_drawTile( DrawCtx* p_dctx, const XP_Rect* rect,
|
||||
|
@ -613,11 +607,9 @@ palm_draw_drawTile( DrawCtx* p_dctx, const XP_Rect* rect,
|
|||
XP_U16 len, width;
|
||||
XP_U16 doubler = 1;
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
if ( dctx->doHiRes ) {
|
||||
doubler = 2;
|
||||
}
|
||||
#endif
|
||||
|
||||
draw_clearRect( p_dctx, &localR );
|
||||
|
||||
|
@ -637,12 +629,10 @@ palm_draw_drawTile( DrawCtx* p_dctx, const XP_Rect* rect,
|
|||
len = XP_STRLEN((const char*)valBuf);
|
||||
|
||||
if ( 0 ) {
|
||||
#ifdef FEATURE_HIGHRES
|
||||
} else if ( dctx->doHiRes && dctx->oneDotFiveAvail ) {
|
||||
smallBoldStringAt( valBuf, len,
|
||||
-(localR.left + localR.width),
|
||||
localR.top + localR.height - dctx->fntHeight - 1 );
|
||||
#endif
|
||||
} else {
|
||||
width = FntCharsWidth( valBuf, len );
|
||||
WinDrawChars( valBuf, len, localR.left + localR.width - width,
|
||||
|
@ -842,11 +832,9 @@ palmMeasureDrawText( PalmDrawCtx* dctx, XP_Rect* bounds, XP_UCHAR* txt,
|
|||
XP_UCHAR* second = NULL;
|
||||
XP_U16 doubler = 1;
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
if ( dctx->doHiRes ) {
|
||||
doubler = 2;
|
||||
}
|
||||
#endif
|
||||
|
||||
widths[0] = FntCharsWidth( (const char*)txt, len ) + 1;
|
||||
|
||||
|
@ -895,11 +883,9 @@ palmMeasureDrawText( PalmDrawCtx* dctx, XP_Rect* bounds, XP_UCHAR* txt,
|
|||
y += 1;
|
||||
} else {
|
||||
y -= 2;
|
||||
#ifdef FEATURE_HIGHRES
|
||||
if ( dctx->doHiRes ) {
|
||||
--y; /* tweak it up one high-res pixel */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
WinDrawChars( (const char*)txt, len, x, y );
|
||||
|
@ -1086,23 +1072,17 @@ palm_draw_score_pendingScore( DrawCtx* p_dctx, const XP_Rect* rect,
|
|||
|
||||
/* There's no room for the pts string if we're in highres mode and
|
||||
WinSetScalingMode isn't available. */
|
||||
#ifdef FEATURE_HIGHRES
|
||||
if ( !dctx->doHiRes || dctx->oneDotFiveAvail )
|
||||
#endif
|
||||
{
|
||||
XP_UCHAR* str = (*dctx->getResStrFunc)( dctx->globals, STR_PTS );
|
||||
if ( !dctx->doHiRes || dctx->oneDotFiveAvail ) {
|
||||
XP_UCHAR* str = (*dctx->getResStrFunc)( dctx->globals, STR_PTS );
|
||||
|
||||
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 );
|
||||
}
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
WinDrawChars( buf, PENDING_DIGITS, x,
|
||||
rect->top + (rect->height/2) - 1 );
|
||||
|
@ -1171,13 +1151,11 @@ palm_draw_drawTimer( DrawCtx* p_dctx, const XP_Rect* rInner,
|
|||
}
|
||||
|
||||
y = localR.top - 2;
|
||||
#ifdef FEATURE_HIGHRES
|
||||
if ( dctx->doHiRes ) {
|
||||
y -= 1; /* tweak it up one high-res pixel */
|
||||
} else {
|
||||
localR.height += 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
WinGetClip( &saveClip );
|
||||
WinSetClip( (RectangleType*)&localR );
|
||||
|
@ -1247,11 +1225,8 @@ splitString( const XP_UCHAR* str, XP_U16* nBufsP, XP_UCHAR** bufs )
|
|||
static XP_U16
|
||||
getMiniLineHt( PalmDrawCtx* dctx )
|
||||
{
|
||||
if ( 0 ) {
|
||||
#ifdef FEATURE_HIGHRES
|
||||
} else if ( dctx->doHiRes ) {
|
||||
if ( dctx->doHiRes ) {
|
||||
return VALUE_HINT_RECT_HEIGHT_HR;
|
||||
#endif
|
||||
} else {
|
||||
return VALUE_HINT_RECT_HEIGHT;
|
||||
}
|
||||
|
@ -1355,9 +1330,7 @@ palm_draw_eraseMiniWindow( DrawCtx* p_dctx, const XP_Rect* rect,
|
|||
void** closure, XP_Bool* invalUnder )
|
||||
{
|
||||
PalmMiniWinData* data = (PalmMiniWinData*)*closure;
|
||||
#if defined MEM_DEBUG || defined FEATURE_HIGHRES
|
||||
PalmDrawCtx* dctx = (PalmDrawCtx*)p_dctx;
|
||||
#endif
|
||||
|
||||
if ( !!closure && !!*closure ) {
|
||||
HIGHRES_PUSH_LOC(dctx);
|
||||
|
@ -1391,9 +1364,7 @@ palm_drawctxt_make( MPFORMAL GraphicsAbility able,
|
|||
MPASSIGN(dctx->mpool, mpool);
|
||||
|
||||
dctx->able = able;
|
||||
#ifdef FEATURE_HIGHRES
|
||||
dctx->doHiRes = globals->hasHiRes && globals->width == 320;
|
||||
#endif
|
||||
dctx->globals = globals;
|
||||
dctx->getResStrFunc = getRSF;
|
||||
dctx->drawingPrefs = drawprefs;
|
||||
|
@ -1459,12 +1430,10 @@ palm_drawctxt_make( MPFORMAL GraphicsAbility able,
|
|||
|
||||
cWinWidth = CHARRECT_WIDTH;
|
||||
cWinHeight = CHARRECT_HEIGHT;
|
||||
#ifdef FEATURE_HIGHRES
|
||||
if ( dctx->doHiRes ) {
|
||||
cWinWidth *= 2;
|
||||
cWinHeight *= 2;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( able == COLOR ) {
|
||||
} else {
|
||||
|
@ -1476,9 +1445,7 @@ palm_drawctxt_make( MPFORMAL GraphicsAbility able,
|
|||
}
|
||||
|
||||
dctx->fntHeight = FntBaseLine();
|
||||
#ifdef FEATURE_HIGHRES
|
||||
dctx->oneDotFiveAvail = globals->oneDotFiveAvail;
|
||||
#endif
|
||||
|
||||
return (DrawCtx*)dctx;
|
||||
} /* palm_drawctxt_make */
|
||||
|
|
|
@ -31,11 +31,9 @@
|
|||
#include <FeatureMgr.h>
|
||||
#include <NotifyMgr.h>
|
||||
#include <unix_stdarg.h>
|
||||
#ifdef FEATURE_HIGHRES
|
||||
# include <FileStream.h>
|
||||
# ifdef FEATURE_SILK
|
||||
# include <SonyCLIE.h>
|
||||
# endif
|
||||
#include <FileStream.h>
|
||||
#ifdef FEATURE_SILK
|
||||
#include <SonyCLIE.h>
|
||||
#endif
|
||||
|
||||
#include "comtypes.h"
|
||||
|
@ -247,7 +245,6 @@ cur_screen_depth( void )
|
|||
} /* cur_screen_depth */
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
static void
|
||||
getSizes( PalmAppGlobals* globals )
|
||||
{
|
||||
|
@ -288,11 +285,7 @@ getSizes( PalmAppGlobals* globals )
|
|||
globals->width = width;
|
||||
globals->height = height;
|
||||
} /* getSizes */
|
||||
#else
|
||||
# define getSizes(g)
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
/* The resources place the tray-related buttons for the high-res case. If
|
||||
* the device is going to want them in the higher low-res position, move them
|
||||
* here. And resize 'em too.
|
||||
|
@ -329,18 +322,11 @@ locateTrayButtons( PalmAppGlobals* globals )
|
|||
}
|
||||
}
|
||||
} /* locateTrayButtons */
|
||||
#else
|
||||
# define locateTrayButtons(g)
|
||||
#endif
|
||||
|
||||
static XP_Bool
|
||||
positionBoard( PalmAppGlobals* globals )
|
||||
{
|
||||
#ifdef FEATURE_HIGHRES
|
||||
XP_U16 bWidth = globals->width;
|
||||
#else
|
||||
# define bWidth 160
|
||||
#endif
|
||||
XP_Bool erase = XP_FALSE;
|
||||
XP_Bool isLefty = globals->isLefty;
|
||||
XP_U16 nCols, leftEdge;
|
||||
|
@ -351,11 +337,7 @@ positionBoard( PalmAppGlobals* globals )
|
|||
XP_U16 timerWidth, timerLeft;
|
||||
XP_U16 freeSpaceH;
|
||||
XP_Bool showGrid = globals->gState.showGrid;
|
||||
XP_U16 doubler =
|
||||
#ifdef FEATURE_HIGHRES
|
||||
globals->useHiRes? 2:
|
||||
#endif
|
||||
1;
|
||||
XP_U16 doubler = globals->useHiRes? 2 : 1;
|
||||
#ifdef SHOW_PROGRESS
|
||||
RectangleType bounds;
|
||||
#endif
|
||||
|
@ -383,11 +365,9 @@ 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 ) {
|
||||
|
@ -455,21 +435,16 @@ positionBoard( PalmAppGlobals* globals )
|
|||
globals->needsScrollbar = false; /* default */
|
||||
boardHeight = scaleV * nCols;
|
||||
|
||||
if ( 0 ) {
|
||||
#ifdef FEATURE_HIGHRES
|
||||
} else if ( globals->useHiRes ) {
|
||||
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 =
|
||||
#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,
|
||||
|
@ -1012,7 +987,6 @@ doCallbackReg( PalmAppGlobals* globals, XP_Bool reg )
|
|||
}
|
||||
} /* doCallbackReg */
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
/* temp workarounds for some sony include file trouble */
|
||||
# ifdef FEATURE_SILK
|
||||
extern Err SilkLibEnableResizeFoo(UInt16 refNum)
|
||||
|
@ -1075,10 +1049,6 @@ uninitHighResGlobals( PalmAppGlobals* globals )
|
|||
}
|
||||
#endif
|
||||
} /* uninitHighResGlobals */
|
||||
#else
|
||||
# define initHighResGlobals(g)
|
||||
# define uninitHighResGlobals(g)
|
||||
#endif
|
||||
|
||||
static XP_Bool
|
||||
canConvertPrefs( XWords4PreferenceType* prefs, UInt16 prefSize, XP_S16 vers )
|
||||
|
@ -2065,7 +2035,6 @@ tryLoadSavedGame( PalmAppGlobals* globals, XP_U16 newIndex )
|
|||
return loaded;
|
||||
} /* tryLoadSavedGame */
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
static XP_U16
|
||||
hresX( PalmAppGlobals* globals, XP_U16 screenX )
|
||||
{
|
||||
|
@ -2095,12 +2064,6 @@ hresRect( PalmAppGlobals* globals, RectangleType* r )
|
|||
}
|
||||
}
|
||||
|
||||
#else
|
||||
# define hresX( g, n ) (n)
|
||||
# define hresY( g, n ) (n)
|
||||
# define hresRect( g, r )
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
****************************************************************************/
|
||||
|
@ -2241,11 +2204,11 @@ mainViewHandleEvent( EventPtr event )
|
|||
break;
|
||||
|
||||
case penDownEvent:
|
||||
globals->penDown = handled;
|
||||
draw = board_handlePenDown( globals->game.board,
|
||||
hresX(globals, event->screenX),
|
||||
hresY(globals, event->screenY),
|
||||
&handled );
|
||||
globals->penDown = handled;
|
||||
break;
|
||||
|
||||
case penMoveEvent:
|
||||
|
|
|
@ -83,11 +83,9 @@ typedef struct PalmDrawCtx {
|
|||
|
||||
GraphicsAbility able;
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
UInt16 oldCoord;
|
||||
XP_Bool doHiRes;
|
||||
XP_Bool oneDotFiveAvail;
|
||||
#endif
|
||||
|
||||
#ifdef TALL_FONTS
|
||||
XP_LangCode fontLangCode;
|
||||
|
@ -284,14 +282,12 @@ struct PalmAppGlobals {
|
|||
ProgressCtxt progress;
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_HIGHRES
|
||||
XP_U16 width, height;
|
||||
XP_U16 sonyLibRef;
|
||||
XP_Bool doVSK;
|
||||
XP_Bool hasHiRes;
|
||||
XP_Bool oneDotFiveAvail;
|
||||
XP_Bool useHiRes;
|
||||
#endif
|
||||
|
||||
#ifdef XWFEATURE_SEARCHLIMIT
|
||||
XP_Bool askTrayLimits;
|
||||
|
|
|
@ -30,13 +30,9 @@
|
|||
|
||||
#define TRAY_HEIGHT_LR 21
|
||||
#define TRAY_BUTTON_HEIGHT_LR 10
|
||||
#ifdef FEATURE_HIGHRES
|
||||
# define TRAY_HEIGHT_HR 16
|
||||
# define TRAY_BUTTON_HEIGHT_HR 8
|
||||
#else
|
||||
# define TRAY_HEIGHT_HR TRAY_HEIGHT_LR
|
||||
# define TRAY_BUTTON_HEIGHT_HR TRAY_BUTTON_HEIGHT_LR
|
||||
#endif
|
||||
|
||||
#define TRAY_HEIGHT_HR 16
|
||||
#define TRAY_BUTTON_HEIGHT_HR 8
|
||||
#define TRAY_BUTTON_WIDTH 9
|
||||
|
||||
#define FLIP_BUTTON_WIDTH 8
|
||||
|
|
Loading…
Reference in a new issue