Exemplo n.º 1
0
static void EndTris(void)
{
  _avtx.Clear();
  _atex.Clear();
  _acol.Clear();
  _aiElements.Clear();
}
Exemplo n.º 2
0
static void ComputerOn(void)
{
  // init button names
  _astrButtonTexts[CMT_INFORMATION ] = TRANS("tactical data");
  _astrButtonTexts[CMT_BACKGROUND  ] = TRANS("strategic data");
  _astrButtonTexts[CMT_WEAPONS     ] = TRANS("weapons");
  _astrButtonTexts[CMT_ENEMIES     ] = TRANS("enemies");
  _astrButtonTexts[CMT_STATISTICS  ] = TRANS("statistics");

  _iFirstMessageOnScreen = -1;
  _iWantedFirstMessageOnScreen = 0;
  _iActiveMessage = 0;
  _cmtCurrentType = (enum CompMsgType)-1;
  _cmtWantedType = CMT_INFORMATION;
  _acmMessages.Clear();

  ASSERT(_ppenPlayer!=NULL);
  if (_ppenPlayer==NULL) {
    return;
  }

  // fill in player statistics
  _ppenPlayer->GetStats(_strStatsDetails, CST_DETAIL, _ctTextCharsPerRow);

  // if end of level
  if (_ppenPlayer!=NULL && _ppenPlayer->m_bEndOfLevel || _pNetwork->IsGameFinished()) {
    // select statistics
    _cmtWantedType = CMT_STATISTICS;
  // if not end of level
  } else {
    // find group with some unread messages
    FindGroupWithUnread();
  }
}
Exemplo n.º 3
0
// update current active message category
static void UpdateType(BOOL bForce=FALSE)
{
  if (_cmtCurrentType==_cmtWantedType && !bForce) {
    return;
  }

  // cleare message cache
  _acmMessages.Clear();
  // for each player's message
  CDynamicStackArray<CCompMessageID> &acmiMsgs = _ppenPlayer->m_acmiMessages;
  for(INDEX i=0; i<acmiMsgs.Count(); i++) {
    CCompMessageID &cmi = acmiMsgs[i];
    // if it is of given type
    if (cmi.cmi_cmtType == _cmtWantedType) {
      // add it to cache
      CCompMessage &cm = _acmMessages.Push();
      cm.SetMessage(&cmi);
    }
  }
  if (!bForce) {
    _cmtCurrentType=_cmtWantedType;
    _iFirstMessageOnScreen = -1;
    _iWantedFirstMessageOnScreen = 0;
    _iActiveMessage = 0;
    _iLastActiveMessage = -2;
    _iTextLineOnScreen = 0;
    LastUnreadMessage();
    UpdateFirstOnScreen();
  }
}
Exemplo n.º 4
0
// turn credits off
void Credits_Off(void)
{
  if (!_bCreditsOn) {
    return;
  }
  _bCreditsOn = FALSE;
  _astrCredits.Clear();
}
Exemplo n.º 5
0
static void ComputerOff(void)
{
  _acmMessages.Clear();
  _pShell->Execute("FreeUnusedStock();");
}