mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
Fix to compile on Palm (68K): remove parameters removed by r3013 and
move slot moved by r2982. Fix -- with gross ifdefs -- warning in pool.c caused by Palm's random() being the only 16-bit one.
This commit is contained in:
parent
6893fe742a
commit
967ba62dff
4 changed files with 10 additions and 10 deletions
|
@ -130,7 +130,11 @@ getRandomTile( PoolContext* pool )
|
|||
* top thereafter.
|
||||
*/
|
||||
|
||||
#if defined PLATFORM_PALM && ! defined XW_TARGET_PNO
|
||||
XP_U16 rr = XP_RANDOM();
|
||||
#else
|
||||
XP_U16 rr = (XP_U16)(XP_RANDOM()>>16);
|
||||
#endif
|
||||
XP_U16 index = (XP_U16)(rr % pool->numTilesLeft);
|
||||
Tile result = getNthPoolTile( pool, index );
|
||||
|
||||
|
|
|
@ -441,7 +441,6 @@ positionBoard( PalmAppGlobals* globals )
|
|||
board_setScoreboardLoc( globals->game.board, scoreLeft, scoreTop,
|
||||
scoreWidth, scoreHeight, showGrid );
|
||||
|
||||
board_setShowColors( globals->game.board, globals->gState.showColors );
|
||||
board_setYOffset( globals->game.board, 0 );
|
||||
|
||||
/* figure location for the tray. If possible, make it smaller than the
|
||||
|
@ -1242,7 +1241,7 @@ startApplication( PalmAppGlobals** globalsP )
|
|||
|
||||
palmInitTProcs( globals, &procs );
|
||||
game_makeNewGame( MEMPOOL &globals->game, &globals->gameInfo,
|
||||
&globals->util, globals->draw, 0,
|
||||
&globals->util, globals->draw,
|
||||
&globals->gState.cp, &procs );
|
||||
|
||||
FrmPopupForm( XW_NEWGAMES_FORM );
|
||||
|
@ -1632,6 +1631,7 @@ showConnState( PalmAppGlobals* globals )
|
|||
if ( globals->lastSendGood ) {
|
||||
switch( globals->netState.relayState ) {
|
||||
case COMMS_RELAYSTATE_UNCONNECTED:
|
||||
case COMMS_RELAYSTATE_DENIED:
|
||||
case COMMS_RELAYSTATE_CONNECT_PENDING:
|
||||
resID = RELAYSTATUS_PENDING_RESID;
|
||||
break;
|
||||
|
@ -2067,7 +2067,7 @@ initAndStartBoard( PalmAppGlobals* globals, XP_Bool newGame )
|
|||
TransportProcs procs;
|
||||
palmInitTProcs( globals, &procs );
|
||||
game_reset( MEMPOOL &globals->game, &globals->gameInfo,
|
||||
&globals->util, 0, &globals->gState.cp, &procs );
|
||||
&globals->util, &globals->gState.cp, &procs );
|
||||
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
if ( !!globals->game.comms ) {
|
||||
|
|
|
@ -125,7 +125,7 @@ typedef struct XWords4PreferenceType {
|
|||
/* these are true global preferences */
|
||||
Boolean showProgress;
|
||||
Boolean showGrid;
|
||||
Boolean showColors;
|
||||
Boolean _unused; /* was showColors */
|
||||
Boolean reserved; /* was oneTimeShown */
|
||||
Boolean reserved1[4]; /* pad out to 12 for ARM */
|
||||
|
||||
|
@ -173,7 +173,6 @@ typedef struct PrefsDlgState {
|
|||
|
||||
XP_U8 phoniesAction;
|
||||
XP_U8 curBdSize;
|
||||
XP_Bool showColors;
|
||||
XP_Bool smartRobot;
|
||||
XP_Bool showProgress;
|
||||
XP_Bool showGrid;
|
||||
|
|
|
@ -192,7 +192,6 @@ GlobalPrefsToLocal( PalmAppGlobals* globals )
|
|||
state->curBdSize = !!globals->game.model?
|
||||
model_numRows( globals->game.model ) : PALM_MAX_ROWS;
|
||||
|
||||
state->showColors = globals->gState.showColors;
|
||||
state->smartRobot = globals->util.gameInfo->robotSmartness == SMART_ROBOT;
|
||||
state->showGrid = globals->gState.showGrid;
|
||||
state->showProgress = globals->gState.showProgress;
|
||||
|
@ -225,8 +224,6 @@ LocalPrefsToGlobal( PalmAppGlobals* globals )
|
|||
|
||||
/* curBdSize handled elsewhere */
|
||||
|
||||
globals->gState.showColors = state->showColors;
|
||||
|
||||
globals->util.gameInfo->robotSmartness =
|
||||
state->smartRobot? SMART_ROBOT:DUMB_ROBOT;
|
||||
|
||||
|
@ -278,7 +275,7 @@ localPrefsToControls( PrefsDlgState* state )
|
|||
setSelectorFromList( XW_PREFS_PHONIES_TRIGGER_ID, state->phoniesList,
|
||||
state->phoniesAction );
|
||||
|
||||
setBooleanCtrl( XW_PREFS_PLAYERCOLORS_CHECKBOX_ID, state->showColors );
|
||||
setBooleanCtrl( XW_PREFS_PLAYERCOLORS_CHECKBOX_ID, state->cp.showColors );
|
||||
setBooleanCtrl( XW_PREFS_PROGRESSBAR_CHECKBOX_ID, state->showProgress );
|
||||
setBooleanCtrl( XW_PREFS_NOHINTS_CHECKBOX_ID, state->hintsNotAllowed );
|
||||
#ifdef XWFEATURE_SEARCHLIMIT
|
||||
|
@ -319,7 +316,7 @@ fieldToNum( UInt16 id )
|
|||
static void
|
||||
controlsToLocalPrefs( PrefsDlgState* state )
|
||||
{
|
||||
state->showColors = getBooleanCtrl( XW_PREFS_PLAYERCOLORS_CHECKBOX_ID );
|
||||
state->cp.showColors = getBooleanCtrl( XW_PREFS_PLAYERCOLORS_CHECKBOX_ID );
|
||||
state->smartRobot = getBooleanCtrl( XW_PREFS_ROBOTSMART_CHECKBOX_ID );
|
||||
state->showGrid = getBooleanCtrl( XW_PREFS_SHOWGRID_CHECKBOX_ID );
|
||||
state->cp.showBoardArrow =
|
||||
|
|
Loading…
Add table
Reference in a new issue