mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
Don't pass new bitmaps struct to draw code uninitialized
This commit is contained in:
parent
f387cd5fa2
commit
b40d8e3f2d
1 changed files with 3 additions and 2 deletions
|
@ -347,6 +347,7 @@ drawCell( BoardCtxt* board, XP_U16 col, XP_U16 row, XP_Bool skipBlanks )
|
||||||
XP_S16 owner = -1;
|
XP_S16 owner = -1;
|
||||||
XP_Bool invert = XP_FALSE;
|
XP_Bool invert = XP_FALSE;
|
||||||
XP_Bitmaps bitmaps;
|
XP_Bitmaps bitmaps;
|
||||||
|
XP_Bitmaps* bptr = NULL;
|
||||||
XP_UCHAR* textP = NULL;
|
XP_UCHAR* textP = NULL;
|
||||||
HintAtts hintAtts;
|
HintAtts hintAtts;
|
||||||
CellFlags flags = CELL_NONE;
|
CellFlags flags = CELL_NONE;
|
||||||
|
@ -386,6 +387,7 @@ drawCell( BoardCtxt* board, XP_U16 col, XP_U16 row, XP_Bool skipBlanks )
|
||||||
} else {
|
} else {
|
||||||
if ( dict_faceIsBitmap( dict, tile ) ) {
|
if ( dict_faceIsBitmap( dict, tile ) ) {
|
||||||
dict_getFaceBitmaps( dict, tile, &bitmaps );
|
dict_getFaceBitmaps( dict, tile, &bitmaps );
|
||||||
|
bptr = &bitmaps;
|
||||||
}
|
}
|
||||||
(void)dict_tilesToString( dict, &tile, 1, ch, sizeof(ch) );
|
(void)dict_tilesToString( dict, &tile, 1, ch, sizeof(ch) );
|
||||||
textP = ch;
|
textP = ch;
|
||||||
|
@ -409,8 +411,7 @@ drawCell( BoardCtxt* board, XP_U16 col, XP_U16 row, XP_Bool skipBlanks )
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
success = draw_drawCell( board->draw, &cellRect, textP,
|
success = draw_drawCell( board->draw, &cellRect, textP, bptr,
|
||||||
bitmaps.nBitmaps > 0? &bitmaps : NULL,
|
|
||||||
tile, owner, bonus, hintAtts, flags );
|
tile, owner, bonus, hintAtts, flags );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue