Ejemplo n.º 1
0
Archivo: draw.c Proyecto: docwhat/cwimp
void DrawState()
{
    Short x;
    Char msg[MaxName+4];

    DrawCurrScore();

    // Fill the fields
    x = 0;
    if ( stor.currplayer > -1 ) {
        // If there is a game on, fill in the names and scores
        for ( ; x < stor.numplayers ; x++ ) {
            StrPrintF( msg, "%d. %s", x+1, stor.player[x].name, NULL );
            SetFieldTextFromStr( fieldNamePlayer[x], msg );
            DrawPlayerScore( x );
        }
    }
    // Clears the rest if the fields
    for ( ; x < MaxPlayers ; x++ ) {
        ClearFieldText( fieldNamePlayer[x] );
        ClearFieldText( fieldScorePlayer[x] );
        ClearFieldText( fieldMarkPlayer[x] );
    }

    for ( x = 0 ; x < NumCubes ; x++ ) {
        DrawCube(x);
        DrawKeepBit(x);
    }

    DrawStayButton();
    DrawRollButton();
    DrawStatus();
    DrawTopStatusButton();
}
Ejemplo n.º 2
0
static void NewGameSetPlayerName( UInt16 field, Int16 player)
{
    if( tmppref[player].type == PlayerNone )
    {
        ClearFieldText( field );
        return;
    }

    if( tmppref[player].type == PlayerHuman )
    {
        SetFieldTextFromStr( field, tmppref[player].hname );
        return;
    }

    SetFieldTextFromStr( field, tmppref[player].aname );
    return;
}
Ejemplo n.º 3
0
Archivo: draw.c Proyecto: docwhat/cwimp
void DrawPlayerScore(Short player) {
  Char msg[MaxName];

  StrIToA( msg, stor.player[player].score );
  SetFieldTextFromStr( fieldScorePlayer[player], msg );

  if ( stor.player[player].lost ) {
    CrossPlayer(player);
    return;
  }

  if ( player == stor.currplayer ) {
    InvertPlayer(player);
    return;
  }

  if ( player == stor.leader ) {
    SetFieldTextFromStr( fieldMarkPlayer[player], LeadSymbol );
    return;
  }

  ClearFieldText( fieldMarkPlayer[player] );
}
Ejemplo n.º 4
0
static void DisplayInvalidDateErrorString(UInt16 id)
{
    FldDrawField(ClearFieldText(Ln2SlFormResult));
    SysCopyStringResource(gAppErrStr, InvalidDateString);
    FrmCustomAlert(ErrorAlert, gAppErrStr, " ", " ");
}