mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
set crosschecks inline
This commit is contained in:
parent
d46723eb6a
commit
213cfbb050
1 changed files with 3 additions and 14 deletions
|
@ -592,19 +592,6 @@ lookup( DictionaryCtxt* dict, array_edge* edge, Tile* buf, XP_U16 tileIndex,
|
||||||
return XP_FALSE;
|
return XP_FALSE;
|
||||||
} /* lookup */
|
} /* lookup */
|
||||||
|
|
||||||
static void
|
|
||||||
setCheck( Crosscheck* check, Tile tile )
|
|
||||||
{
|
|
||||||
CrossBits* ptr = &check->bits[0];
|
|
||||||
XP_ASSERT( tile < MAX_UNIQUE_TILES );
|
|
||||||
while ( tile > 31 ) {
|
|
||||||
++ptr;
|
|
||||||
tile -= 32;
|
|
||||||
XP_ASSERT( tile <= 31 ); /* only iterate once!!! */
|
|
||||||
}
|
|
||||||
*ptr |= 1L << tile;
|
|
||||||
} /* setCheck */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
figureCrosschecks( EngineCtxt* engine, XP_U16 x, XP_U16 y, XP_U16* scoreP,
|
figureCrosschecks( EngineCtxt* engine, XP_U16 x, XP_U16 y, XP_U16* scoreP,
|
||||||
Crosscheck* check )
|
Crosscheck* check )
|
||||||
|
@ -702,7 +689,9 @@ figureCrosschecks( EngineCtxt* engine, XP_U16 x, XP_U16 y, XP_U16* scoreP,
|
||||||
XP_ASSERT( tile < MAX_UNIQUE_TILES );
|
XP_ASSERT( tile < MAX_UNIQUE_TILES );
|
||||||
tiles[0] = tile;
|
tiles[0] = tile;
|
||||||
if ( lookup( dict, in_edge, tiles, 0, tilesAfter ) ) {
|
if ( lookup( dict, in_edge, tiles, 0, tilesAfter ) ) {
|
||||||
setCheck( check, tile );
|
XP_ASSERT( (tile >> 5)
|
||||||
|
< (sizeof(check->bits)/sizeof(check->bits[0])) );
|
||||||
|
check->bits[tile>>5] |= (1 << (tile & 0x1F));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( IS_LAST_EDGE(dict,candidateEdge ) ) {
|
if ( IS_LAST_EDGE(dict,candidateEdge ) ) {
|
||||||
|
|
Loading…
Reference in a new issue