mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
debug macros and wierd rewrite of code using random and mod. This makes it work on ce!
This commit is contained in:
parent
323240fa6b
commit
502cddcf1f
2 changed files with 8 additions and 4 deletions
|
@ -137,4 +137,8 @@ typedef struct CommonPrefs {
|
|||
|
||||
#endif
|
||||
|
||||
#define LOG_FUNC() XP_LOGF( "IN: %s", __FUNCTION__ )
|
||||
#define LOG_RETURNF(fmt,val) XP_LOGF( "%s => " fmt, __FUNCTION__, val )
|
||||
#define LOG_RETURN_VOID() LOG_RETURNF("%s","void")
|
||||
|
||||
#endif
|
||||
|
|
|
@ -131,10 +131,10 @@ getRandomTile( PoolContext* pool )
|
|||
* in that case if move to shuffling once and just taking tiles off the
|
||||
* top thereafter.
|
||||
*/
|
||||
XP_U16 index = (XP_U16)(XP_RANDOM() % pool->numTilesLeft);
|
||||
Tile result;
|
||||
|
||||
result = getNthPoolTile( pool, index );
|
||||
XP_U16 r = (XP_U16)XP_RANDOM();
|
||||
XP_U16 index = (XP_U16)(r % pool->numTilesLeft);
|
||||
Tile result = getNthPoolTile( pool, index );
|
||||
|
||||
--pool->lettersLeft[result];
|
||||
--pool->numTilesLeft;
|
||||
|
|
Loading…
Add table
Reference in a new issue