mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
cleanup and list changes
This commit is contained in:
parent
5343b054a5
commit
8407d3b300
3 changed files with 31 additions and 38 deletions
|
@ -23,12 +23,9 @@
|
|||
|
||||
<h3>New with this release</h3>
|
||||
<ul>
|
||||
<li>Post reminder notifications when it's been your turn for
|
||||
one, two or three days</li>
|
||||
<li>Fix crash when a player has a password</li>
|
||||
<li>Don't draw network status icon on top of game timer</li>
|
||||
<li>Unselect games in group that's collapsed</li>
|
||||
<li>Fix crash on older devices (with menu keys)</li>
|
||||
<li>Include summary of move in notification bar message</li>
|
||||
<li>Hide crosshairs except when a tile is being dragged</li>
|
||||
<li>Add debug setting to change turn reminder frequency</li>
|
||||
</ul>
|
||||
|
||||
<p>(The full changelog
|
||||
|
|
|
@ -28,14 +28,14 @@ import android.content.Intent;
|
|||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.eehouse.android.xw4.DBUtils.NeedsNagInfo;
|
||||
import org.eehouse.android.xw4.loc.LocUtils;
|
||||
import org.eehouse.android.xw4.jni.GameSummary;
|
||||
import org.eehouse.android.xw4.loc.LocUtils;
|
||||
|
||||
public class NagTurnReceiver extends BroadcastReceiver {
|
||||
|
||||
|
|
|
@ -2191,35 +2191,32 @@ static void
|
|||
scoreLastMove( ModelCtxt* model, MoveInfo* moveInfo, XP_U16 howMany,
|
||||
LastMoveInfo* lmi )
|
||||
{
|
||||
lmi->nTiles = moveInfo->nTiles;
|
||||
if ( 0 < moveInfo->nTiles ) {
|
||||
XP_U16 score;
|
||||
const XP_UCHAR* format;
|
||||
WordNotifierInfo notifyInfo;
|
||||
FirstWordData data;
|
||||
XP_U16 score;
|
||||
const XP_UCHAR* format;
|
||||
WordNotifierInfo notifyInfo;
|
||||
FirstWordData data;
|
||||
|
||||
ModelCtxt* tmpModel = makeTmpModel( model, NULL, NULL, NULL, NULL );
|
||||
XP_U16 turn;
|
||||
XP_S16 moveNum = -1;
|
||||
ModelCtxt* tmpModel = makeTmpModel( model, NULL, NULL, NULL, NULL );
|
||||
XP_U16 turn;
|
||||
XP_S16 moveNum = -1;
|
||||
|
||||
copyStack( model, tmpModel->vol.stack, model->vol.stack );
|
||||
copyStack( model, tmpModel->vol.stack, model->vol.stack );
|
||||
|
||||
if ( !model_undoLatestMoves( tmpModel, NULL, howMany, &turn,
|
||||
&moveNum ) ) {
|
||||
XP_ASSERT( 0 );
|
||||
}
|
||||
|
||||
data.word[0] = '\0';
|
||||
notifyInfo.proc = getFirstWord;
|
||||
notifyInfo.closure = &data;
|
||||
score = figureMoveScore( tmpModel, turn, moveInfo, (EngineCtxt*)NULL,
|
||||
(XWStreamCtxt*)NULL, ¬ifyInfo );
|
||||
|
||||
model_destroy( tmpModel );
|
||||
|
||||
lmi->score = score;
|
||||
XP_SNPRINTF( lmi->word, VSIZE(lmi->word), "%s", data.word );
|
||||
if ( !model_undoLatestMoves( tmpModel, NULL, howMany, &turn,
|
||||
&moveNum ) ) {
|
||||
XP_ASSERT( 0 );
|
||||
}
|
||||
|
||||
data.word[0] = '\0';
|
||||
notifyInfo.proc = getFirstWord;
|
||||
notifyInfo.closure = &data;
|
||||
score = figureMoveScore( tmpModel, turn, moveInfo, (EngineCtxt*)NULL,
|
||||
(XWStreamCtxt*)NULL, ¬ifyInfo );
|
||||
|
||||
model_destroy( tmpModel );
|
||||
|
||||
lmi->score = score;
|
||||
XP_SNPRINTF( lmi->word, VSIZE(lmi->word), "%s", data.word );
|
||||
} /* scoreLastMove */
|
||||
|
||||
static XP_U16
|
||||
|
@ -2370,8 +2367,6 @@ model_listWordsThrough( ModelCtxt* model, XP_U16 col, XP_U16 row,
|
|||
XP_Bool
|
||||
model_getPlayersLastScore( ModelCtxt* model, XP_S16 player, LastMoveInfo* lmi )
|
||||
{
|
||||
XP_LOGF( "%s(player=%d)", __func__, player );
|
||||
|
||||
StackCtxt* stack = model->vol.stack;
|
||||
XP_S16 nEntries, which;
|
||||
StackEntry entry;
|
||||
|
@ -2401,9 +2396,11 @@ model_getPlayersLastScore( ModelCtxt* model, XP_S16 player, LastMoveInfo* lmi )
|
|||
|
||||
switch ( entry.moveType ) {
|
||||
case MOVE_TYPE:
|
||||
scoreLastMove( model, &entry.u.move.moveInfo, nEntries - which,
|
||||
lmi );
|
||||
lmi->nTiles = entry.u.move.moveInfo.nTiles;
|
||||
if ( 0 < entry.u.move.moveInfo.nTiles ) {
|
||||
scoreLastMove( model, &entry.u.move.moveInfo, nEntries - which,
|
||||
lmi );
|
||||
}
|
||||
break;
|
||||
case TRADE_TYPE:
|
||||
lmi->nTiles = entry.u.trade.oldTiles.nTiles;
|
||||
|
@ -2416,7 +2413,6 @@ model_getPlayersLastScore( ModelCtxt* model, XP_S16 player, LastMoveInfo* lmi )
|
|||
}
|
||||
}
|
||||
|
||||
LOG_RETURNF( "%d", found );
|
||||
return found;
|
||||
} /* model_getPlayersLastScore */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue