diff --git a/Sources/GameGUIMP/DlgEditButtonAction.cpp b/Sources/GameGUIMP/DlgEditButtonAction.cpp index 1899ef372..30a666753 100644 --- a/Sources/GameGUIMP/DlgEditButtonAction.cpp +++ b/Sources/GameGUIMP/DlgEditButtonAction.cpp @@ -64,9 +64,9 @@ void CDlgEditButtonAction::DoDataExchange(CDataExchange* pDX) // if dialog is giving data if( pDX->m_bSaveAndValidate != FALSE) { - m_pbaButtonAction->ba_strName = m_strButtonActionName; - m_pbaButtonAction->ba_strCommandLineWhenPressed = m_strButtonDownCommand; - m_pbaButtonAction->ba_strCommandLineWhenReleased = m_strButtonUpCommand; + m_pbaButtonAction->ba_strName = CStringA(m_strButtonActionName); + m_pbaButtonAction->ba_strCommandLineWhenPressed = CStringA(m_strButtonDownCommand); + m_pbaButtonAction->ba_strCommandLineWhenReleased = CStringA(m_strButtonUpCommand); } } diff --git a/Sources/GameGUIMP/DlgPlayerControls.cpp b/Sources/GameGUIMP/DlgPlayerControls.cpp index 68c405f95..8702540cb 100644 --- a/Sources/GameGUIMP/DlgPlayerControls.cpp +++ b/Sources/GameGUIMP/DlgPlayerControls.cpp @@ -61,7 +61,7 @@ void CDlgPlayerControls::DoDataExchange(CDataExchange* pDX) // enable combo control m_comboControlerAxis.EnableWindow(); // get curently mounted controler description - CTString strControlerName = m_listAxisActions.GetItemText( iSelectedAxis, 1); + CString strControlerName = m_listAxisActions.GetItemText( iSelectedAxis, 1); // find in combo currently selected mounted axis int iComboEntry = m_comboControlerAxis.FindStringExact( -1, strControlerName); // and select it @@ -187,13 +187,13 @@ void CDlgPlayerControls::FillActionsList(void) // macro for adding single button action into list control itItem.iItem = ctItemsAdded; itItem.iSubItem = 0; - itItem.pszText = (char *)(const char *) itButtonAction->ba_strName; + itItem.pszText = (LPTSTR)itButtonAction->ba_strName.Data(); m_listButtonActions.InsertItem( &itItem); itItem.iSubItem = 1; - itItem.pszText = (char *)(const char *)_pInput->GetButtonName( itButtonAction->ba_iFirstKey); + itItem.pszText = (LPTSTR)_pInput->GetButtonName( itButtonAction->ba_iFirstKey).ConstData(); m_listButtonActions.SetItem( &itItem); itItem.iSubItem = 2; - itItem.pszText = (char *)(const char *)_pInput->GetButtonName( itButtonAction->ba_iSecondKey); + itItem.pszText = (LPTSTR)_pInput->GetButtonName( itButtonAction->ba_iSecondKey).ConstData(); m_listButtonActions.SetItem( &itItem); ctItemsAdded++; } @@ -225,11 +225,11 @@ void CDlgPlayerControls::FillAxisList(void) for(INDEX iAxis = 0; iAxisgm_astrAxisNames[iAxis]; + itItem.pszText = (LPTSTR)_pGame->gm_astrAxisNames[iAxis].ConstData(); m_listAxisActions.InsertItem( &itItem); itItem.iSubItem = 1; - itItem.pszText = (char *)(const char *)_pInput->GetAxisName( - m_ctrlControls.ctrl_aaAxisActions[iAxis].aa_iAxisAction); + itItem.pszText = (LPTSTR)_pInput->GetAxisName( + m_ctrlControls.ctrl_aaAxisActions[iAxis].aa_iAxisAction).ConstData(); m_listAxisActions.SetItem( &itItem); } @@ -259,14 +259,14 @@ BOOL CDlgPlayerControls::OnInitDialog() m_listButtonActions.GetClientRect( rectListControl); // insert column for action names INDEX iMainColumnWidth = rectListControl.Width()*BUTTON_ACTION_NAME_PERCENTAGE/100; - m_listButtonActions.InsertColumn( 0, "Button action", LVCFMT_LEFT, iMainColumnWidth); + m_listButtonActions.InsertColumn( 0, CString("Button action"), LVCFMT_LEFT, iMainColumnWidth); // insert first control column INDEX iFirstSubColumnWidth = (rectListControl.Width()*(100-BUTTON_ACTION_NAME_PERCENTAGE)/2)/100; - m_listButtonActions.InsertColumn( 1, "First", LVCFMT_LEFT, iFirstSubColumnWidth); + m_listButtonActions.InsertColumn( 1, CString("First"), LVCFMT_LEFT, iFirstSubColumnWidth); // insert second control column INDEX iSecondSubColumnWidth = rectListControl.Width()-iMainColumnWidth-iFirstSubColumnWidth - 16; - m_listButtonActions.InsertColumn( 2, "Second", LVCFMT_LEFT, iSecondSubColumnWidth); + m_listButtonActions.InsertColumn( 2, CString("Second"), LVCFMT_LEFT, iSecondSubColumnWidth); // add all actions into actions list FillActionsList(); @@ -275,10 +275,10 @@ BOOL CDlgPlayerControls::OnInitDialog() m_listAxisActions.GetClientRect( rectListControl); // insert column for axis action names iMainColumnWidth = rectListControl.Width()*AXIS_ACTION_NAME_PERCENTAGE/100; - m_listAxisActions.InsertColumn( 0, "Axis action", LVCFMT_LEFT, iMainColumnWidth); + m_listAxisActions.InsertColumn( 0, CString("Axis action"), LVCFMT_LEFT, iMainColumnWidth); // insert mounting controls column INDEX iAxisMouterNameWidth = rectListControl.Width()*(100-AXIS_ACTION_NAME_PERCENTAGE)/100-1; - m_listAxisActions.InsertColumn( 1, "Current controler", LVCFMT_LEFT, iAxisMouterNameWidth); + m_listAxisActions.InsertColumn( 1, CString("Current controler"), LVCFMT_LEFT, iAxisMouterNameWidth); // add all available axis into axis list FillAxisList(); @@ -286,7 +286,7 @@ BOOL CDlgPlayerControls::OnInitDialog() // for all possible axis mounting controlers for( INDEX iAxis=0; iAxis<_pInput->GetAvailableAxisCount(); iAxis++) { - m_comboControlerAxis.AddString( _pInput->GetAxisName( iAxis)); + m_comboControlerAxis.AddString( CString( _pInput->GetAxisName( iAxis))); } return TRUE; @@ -299,11 +299,11 @@ void CDlgPlayerControls::SetFirstAndSecondButtonNames(void) if( pbaCurrent != NULL) { // type first currently mounted button's name - m_editFirstControl.SetWindowText( (char *)(const char *) - _pInput->GetButtonName( pbaCurrent->ba_iFirstKey) ); + m_editFirstControl.SetWindowText( CString( + _pInput->GetButtonName( pbaCurrent->ba_iFirstKey) )); // type second currently mounted button's name - m_editSecondControl.SetWindowText( (char *)(const char *) - _pInput->GetButtonName( pbaCurrent->ba_iSecondKey) ); + m_editSecondControl.SetWindowText( CString( + _pInput->GetButtonName( pbaCurrent->ba_iSecondKey) )); // enable edit key and "none" controls bEnablePressKeyControls = TRUE; } diff --git a/Sources/GameGUIMP/DlgPlayerSettings.cpp b/Sources/GameGUIMP/DlgPlayerSettings.cpp index c7d19763e..5c81d4f93 100644 --- a/Sources/GameGUIMP/DlgPlayerSettings.cpp +++ b/Sources/GameGUIMP/DlgPlayerSettings.cpp @@ -121,9 +121,9 @@ void CDlgPlayerSettings::InitPlayersAndControlsLists(void) for( INDEX iPC=0; iPC<8; iPC++) { CTString strPlayer = _pGame->gm_apcPlayers[ iPC].pc_strName; - m_listAvailablePlayers.AddString( strPlayer); + m_listAvailablePlayers.AddString( CString(strPlayer)); //CTString strControls = _pGame->gm_actrlControls[ iPC].ctrl_strName; - m_listAvailableControls.AddString( "dummy"); + m_listAvailableControls.AddString( CString("dummy")); } m_listAvailableControls.SetCurSel( 0); m_listAvailablePlayers.SetCurSel( 0); @@ -168,7 +168,7 @@ void CDlgPlayerSettings::OnEditControls() } catch (char *strError) { - AfxMessageBox( strError); + AfxMessageBox( CString(strError)); return; } } @@ -184,7 +184,7 @@ void CDlgPlayerSettings::OnRenameControls() dlgRename.m_strName = "dummy"; // if new file properly edited and ok pressed if( (dlgRename.DoModal() == IDOK) && - (strlen( dlgRename.m_strName) != 0) ) + (dlgRename.m_strName.GetLength() != 0) ) { // _pGame->gm_actrlControls[ iSelectedControls].ctrl_strName = dlgRename.m_strName; // save players and controls @@ -204,9 +204,9 @@ void CDlgPlayerSettings::OnRenamePlayer() dlgRename.m_strName = strName; // if new file properly edited and ok pressed if( (dlgRename.DoModal() == IDOK) && - (strlen( dlgRename.m_strName) != 0) ) + (dlgRename.m_strName.GetLength() != 0) ) { - _pGame->gm_apcPlayers[ iSelectedPlayer].pc_strName = dlgRename.m_strName; + _pGame->gm_apcPlayers[ iSelectedPlayer].pc_strName = CStringA(dlgRename.m_strName); // save players and controls _pGame->SavePlayersAndControls(); InitPlayersAndControlsLists(); diff --git a/Sources/GameGUIMP/DlgSelectPlayer.cpp b/Sources/GameGUIMP/DlgSelectPlayer.cpp index cdeba51b4..15fc98fe4 100644 --- a/Sources/GameGUIMP/DlgSelectPlayer.cpp +++ b/Sources/GameGUIMP/DlgSelectPlayer.cpp @@ -84,9 +84,9 @@ BOOL CDlgSelectPlayer::OnInitDialog() for( INDEX iPC=0; iPC<8; iPC++) { CTString strPlayer = _pGame->gm_apcPlayers[ iPC].pc_strName; - m_comboAvailablePlayers.AddString( strPlayer); + m_comboAvailablePlayers.AddString( CString(strPlayer)); // CTString strControls = _pGame->gm_actrlControls[ iPC].ctrl_strName; - m_comboAvailableControls.AddString( "dummy"); + m_comboAvailableControls.AddString( CString("dummy")); } m_comboAvailablePlayers.SetCurSel( _pGame->gm_iWEDSinglePlayer); m_comboAvailableControls.SetCurSel( _pGame->gm_iWEDSinglePlayer); diff --git a/Sources/GameGUIMP/EditConsole.cpp b/Sources/GameGUIMP/EditConsole.cpp index 7fabb521f..b7af580ed 100644 --- a/Sources/GameGUIMP/EditConsole.cpp +++ b/Sources/GameGUIMP/EditConsole.cpp @@ -85,7 +85,7 @@ BOOL CEditConsole::PreTranslateMessage(MSG* pMsg) if( !bCtrl && (iCharOffset != -1) ) { // extract string to execute - wchar_t achrToExecute[ 1024]; + TCHAR achrToExecute[ 1024]; INDEX ctLetters = GetLine( iCurrentLine, achrToExecute, 1023); // set EOF delimiter achrToExecute[ ctLetters] = 0; diff --git a/Sources/GameGUIMP/GameGUI.cpp b/Sources/GameGUIMP/GameGUI.cpp index 71256f716..426fcc73f 100644 --- a/Sources/GameGUIMP/GameGUI.cpp +++ b/Sources/GameGUIMP/GameGUI.cpp @@ -168,7 +168,7 @@ void CGameGUI::OnInvokeConsole(void) void CGameGUI::OnPlayerSettings(void) { - //CALL_DIALOG( CDlgPlayerSettings, dlgPlayerSettings); + CALL_DIALOG( CDlgPlayerSettings, dlgPlayerSettings); } void CGameGUI::OnAudioQuality(void) @@ -183,5 +183,5 @@ void CGameGUI::OnVideoQuality(void) void CGameGUI::OnSelectPlayerAndControls(void) { - //CALL_DIALOG( CDlgSelectPlayer, dlgSelectPlayerAndControls); + CALL_DIALOG( CDlgSelectPlayer, dlgSelectPlayerAndControls); } diff --git a/Sources/GameGUIMP/GameGUIMP.vcxproj b/Sources/GameGUIMP/GameGUIMP.vcxproj index cb9442173..c1e2f3a97 100644 --- a/Sources/GameGUIMP/GameGUIMP.vcxproj +++ b/Sources/GameGUIMP/GameGUIMP.vcxproj @@ -269,52 +269,17 @@ - - true - true - true - true - - - true - true - true - true - + + - - true - true - true - true - + - - true - true - true - true - - - true - true - true - true - - - true - true - true - true - - - true - true - true - true - + + + +