mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
Pass string for tile even when it has a bitmap. Let platform decide which to use.
This commit is contained in:
parent
1dd8363c3f
commit
4529e564e4
2 changed files with 10 additions and 7 deletions
|
@ -383,10 +383,11 @@ drawCell( BoardCtxt* board, XP_U16 col, XP_U16 row, XP_Bool skipBlanks )
|
|||
XP_U16 val = dict_getTileValue( dict, valTile );
|
||||
XP_SNPRINTF( ch, sizeof(ch), (XP_UCHAR*)"%d", val );
|
||||
textP = ch;
|
||||
} else if ( dict_faceIsBitmap( dict, tile ) ) {
|
||||
bitmap = dict_getFaceBitmap( dict, tile, XP_FALSE );
|
||||
XP_ASSERT( !!bitmap );
|
||||
} else {
|
||||
if ( dict_faceIsBitmap( dict, tile ) ) {
|
||||
bitmap = dict_getFaceBitmap( dict, tile, XP_FALSE );
|
||||
XP_ASSERT( !!bitmap );
|
||||
}
|
||||
(void)dict_tilesToString( dict, &tile, 1, ch, sizeof(ch) );
|
||||
textP = ch;
|
||||
}
|
||||
|
|
|
@ -268,14 +268,16 @@ getTileDrawInfo( const BoardCtxt* board, Tile tile, XP_Bool isBlank,
|
|||
DictionaryCtxt* dict = model_getDictionary( board->model );
|
||||
if ( isBlank ) {
|
||||
tile = dict_getBlankTile( dict );
|
||||
}
|
||||
*value = dict_getTileValue( dict, tile );
|
||||
if ( dict_faceIsBitmap( dict, tile ) ) {
|
||||
*bitmap = dict_getFaceBitmap( dict, tile, XP_TRUE );
|
||||
} else {
|
||||
dict_tilesToString( dict, &tile, 1, buf, len );
|
||||
face = buf;
|
||||
}
|
||||
|
||||
*value = dict_getTileValue( dict, tile );
|
||||
if ( dict_faceIsBitmap( dict, tile ) ) {
|
||||
*bitmap = dict_getFaceBitmap( dict, tile, XP_TRUE );
|
||||
}
|
||||
|
||||
return face;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue