diff --git a/IDE/ChoixAction.cpp b/IDE/ChoixAction.cpp index fd391aeaa3..c396169dbe 100644 --- a/IDE/ChoixAction.cpp +++ b/IDE/ChoixAction.cpp @@ -33,7 +33,7 @@ #include "GDL/gdTreeItemStringData.h" #include "Extensions.h" #include "GDL/HelpFileAccess.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "GDL/TranslateAction.h" #include "GDL/Scene.h" #include "GDL/Game.h" @@ -188,7 +188,7 @@ scene(scene_) //Pour chaque paramètres for ( unsigned int i = 0;i < MaxPara;i++ ) { - const string num = st( i ); + const string num =ToString( i ); //Bouton radio pour facultatif ou pas ParaFac.push_back(new wxCheckBox( this, ID_CHECKARRAY, "", wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, num )); diff --git a/IDE/ChoixCondition.cpp b/IDE/ChoixCondition.cpp index 9cbadc0995..445f81e5bb 100644 --- a/IDE/ChoixCondition.cpp +++ b/IDE/ChoixCondition.cpp @@ -52,7 +52,7 @@ #include #include -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "MemTrace.h" #include "GDL/Scene.h" #include "GDL/Game.h" @@ -231,7 +231,7 @@ scene(scene_) { //Un sizer - string num = st( i ); + string num =ToString( i ); //Bouton radio pour facultatif ou pas ParaFac.push_back(new wxCheckBox( this, ID_CHECKARRAY, "", wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, num )); diff --git a/IDE/ChoixTemplateEvent.cpp b/IDE/ChoixTemplateEvent.cpp index 27ddfec4d0..40d0233d66 100644 --- a/IDE/ChoixTemplateEvent.cpp +++ b/IDE/ChoixTemplateEvent.cpp @@ -15,7 +15,7 @@ #include #include "tinyxml.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "GDL/OpenSaveGame.h" #include "TemplateEvents.h" #include "GDL/HelpFileAccess.h" @@ -213,7 +213,7 @@ void ChoixTemplateEvent::ProcessEvents(vector < BaseEventSPtr > & events ) while ( paramNb < parametersEdit.size() ) { string str = allConditionsVectors[k]->at(l).GetParameter(m).GetPlainString(); - allConditionsVectors[k]->at(l).SetParameter(m , ConvertParam( str, "_PARAM"+toString(paramNb+1)+"_", static_cast( parametersEdit[paramNb]->GetValue() ) ) ); + allConditionsVectors[k]->at(l).SetParameter(m , ConvertParam( str, "_PARAM"+ToString(paramNb+1)+"_", static_cast( parametersEdit[paramNb]->GetValue() ) ) ); paramNb++; } } @@ -231,7 +231,7 @@ void ChoixTemplateEvent::ProcessEvents(vector < BaseEventSPtr > & events ) while ( paramNb < parametersEdit.size() ) { string str = allActionsVectors[k]->at(l).GetParameter(m).GetPlainString(); - allActionsVectors[k]->at(l).SetParameter(m , ConvertParam( str, "_PARAM"+toString(paramNb+1)+"_", static_cast( parametersEdit[paramNb]->GetValue() ) ) ); + allActionsVectors[k]->at(l).SetParameter(m , ConvertParam( str, "_PARAM"+ToString(paramNb+1)+"_", static_cast( parametersEdit[paramNb]->GetValue() ) ) ); paramNb++; } } @@ -287,9 +287,9 @@ void ChoixTemplateEvent::Refresh() else { wxLogWarning( "Les informations concernant la description d'un template manquent." ); } unsigned int i = 1; - while ( elem->Attribute(string("param"+toString(i)).c_str()) != NULL ) + while ( elem->Attribute(string("param"+ToString(i)).c_str()) != NULL ) { - newTemplate.parameters.push_back(elem->Attribute(string("param"+toString(i)).c_str())); + newTemplate.parameters.push_back(elem->Attribute(string("param"+ToString(i)).c_str())); ++i; } @@ -346,9 +346,9 @@ void ChoixTemplateEvent::OnTemplateTreeSelectionChanged( wxTreeEvent& event ) //Add control if necessary while ( descriptionsTxt.size() < templatesList[j].parameters.size() ) { - descriptionsTxt.push_back(new wxStaticText(this, wxID_ANY, _("Description"), wxDefaultPosition, wxDefaultSize, 0, toString(descriptionsTxt.size()))); + descriptionsTxt.push_back(new wxStaticText(this, wxID_ANY, _("Description"), wxDefaultPosition, wxDefaultSize, 0, ToString(descriptionsTxt.size()))); controlsSizer->Add(descriptionsTxt.back(), 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - parametersEdit.push_back(new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, toString(parametersEdit.size()))); + parametersEdit.push_back(new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, ToString(parametersEdit.size()))); controlsSizer->Add(parametersEdit.back(), 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); } diff --git a/IDE/Clipboard.cpp b/IDE/Clipboard.cpp index cda386c8cc..ee1c81ff53 100644 --- a/IDE/Clipboard.cpp +++ b/IDE/Clipboard.cpp @@ -58,7 +58,7 @@ void Clipboard::kill() void Clipboard::SetObject( ObjSPtr object ) { gdp::ExtensionsManager * extensionsManager = gdp::ExtensionsManager::getInstance(); - objectCopied = extensionsManager->CreateObject(object); + objectCopied = object->Clone(); hasObject = true; } diff --git a/IDE/CompilationChecker.cpp b/IDE/CompilationChecker.cpp index d68b88c0b9..38cdcea111 100644 --- a/IDE/CompilationChecker.cpp +++ b/IDE/CompilationChecker.cpp @@ -1,12 +1,12 @@ #include "CompilationChecker.h" #include "GDL/Version.h" #include "GDL/VersionWrapper.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" bool CompilationChecker::EnsureCorrectGDLVersion() { - string versionString = toString(GDLVersionWrapper::Major()) + ", " + toString(GDLVersionWrapper::Minor()) + ", " + - toString(GDLVersionWrapper::Build()) + ", " + toString(GDLVersionWrapper::Revision()); + string versionString = ToString(GDLVersionWrapper::Major()) + ", " + ToString(GDLVersionWrapper::Minor()) + ", " + + ToString(GDLVersionWrapper::Build()) + ", " + ToString(GDLVersionWrapper::Revision()); if (versionString != RC_FILEVERSION_STRING) { diff --git a/IDE/CreateTemplate.cpp b/IDE/CreateTemplate.cpp index faf6bb3e95..393ec6e75b 100644 --- a/IDE/CreateTemplate.cpp +++ b/IDE/CreateTemplate.cpp @@ -17,7 +17,7 @@ #include "GDL/Game.h" #include "GDL/OpenSaveGame.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" using namespace std; @@ -291,7 +291,7 @@ void CreateTemplate::ProcessEvents(vector < BaseEventSPtr > & eventsToProcess, v //On respecte bien l'ordre, du plus grand au plus petit for ( unsigned int k = 0; k < parameters.size() ;k++ ) { - string ReplaceBy = "_PARAM" + st( parameters.at( k ).second ) + "_"; + string ReplaceBy = "_PARAM" +ToString( parameters.at( k ).second ) + "_"; parametres.at( j ) = GDExpression( ConvertParam( parametres.at( j ).GetPlainString(), parameters.at( k ).first, ReplaceBy ) ); } } @@ -310,7 +310,7 @@ void CreateTemplate::ProcessEvents(vector < BaseEventSPtr > & eventsToProcess, v //On respecte bien l'ordre, du plus grand au plus petit for ( unsigned int k = 0; k < parameters.size() ;k++ ) { - string ReplaceBy = "_PARAM" + st( parameters.at( k ).second ) + "_"; + string ReplaceBy = "_PARAM" +ToString( parameters.at( k ).second ) + "_"; parametres.at( j ) = GDExpression( ConvertParam( parametres.at( j ).GetPlainString(), parameters.at( k ).first, ReplaceBy ) ); } } diff --git a/IDE/DebuggerGUI.cpp b/IDE/DebuggerGUI.cpp index f7139dd1b0..c652916bfe 100644 --- a/IDE/DebuggerGUI.cpp +++ b/IDE/DebuggerGUI.cpp @@ -9,7 +9,7 @@ #include #include #include -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #ifdef ___WXMSW___ #include @@ -246,13 +246,13 @@ void DebuggerGUI::UpdateGUI() return; //Général - generalList->SetItem(0, 1, toString(1/scene.GetElapsedTime())+_(" i/s")); - generalList->SetItem(1, 1, toString(scene.GetElapsedTime())+"s"); - generalList->SetItem(2, 1, toString(scene.objectsInstances.GetAllObjects().size())); - generalList->SetItem(3, 1, toString(scene.game->images.size())); - generalList->SetItem(4, 1, toString(scene.game->windowWidth)+"*"+toString(scene.game->windowHeight)); - generalList->SetItem(5, 1, toString(scene.input->GetMouseX())+";"+toString(scene.input->GetMouseY())); - generalList->SetItem(6, 1, toString(scene.GetTimeFromStart())+"s"); + generalList->SetItem(0, 1, ToString(1/scene.GetElapsedTime())+_(" i/s")); + generalList->SetItem(1, 1, ToString(scene.GetElapsedTime())+"s"); + generalList->SetItem(2, 1, ToString(scene.objectsInstances.GetAllObjects().size())); + generalList->SetItem(3, 1, ToString(scene.game->images.size())); + generalList->SetItem(4, 1, ToString(scene.game->windowWidth)+"*"+ToString(scene.game->windowHeight)); + generalList->SetItem(5, 1, ToString(scene.input->GetMouseX())+";"+ToString(scene.input->GetMouseY())); + generalList->SetItem(6, 1, ToString(scene.GetTimeFromStart())+"s"); const vector < Variable > sceneVariables = scene.variables.GetVariablesVector(); const vector < Variable > gameVariables = scene.game->variables.GetVariablesVector(); @@ -338,7 +338,7 @@ void DebuggerGUI::UpdateGUI() if ( objectsInTree[weakPtrToObject].first != allObjects[i]->GetName() ) { objectsTree->Delete(objectsInTree[weakPtrToObject].second); - wxTreeItemId objectItem = objectsTree->AppendItem(initialObjects[allObjects[i]->GetName()], toString(i)); + wxTreeItemId objectItem = objectsTree->AppendItem(initialObjects[allObjects[i]->GetName()], ToString(i)); objectsInTree[weakPtrToObject] = pair(allObjects[i]->GetName(), objectItem); } } @@ -649,14 +649,13 @@ void DebuggerGUI::OnAddObjBtClick( wxCommandEvent & event ) int IDsceneObject = Picker::PickOneObject( &scene.initialObjects, objectWanted ); int IDglobalObject = Picker::PickOneObject( &scene.game->globalObjects, objectWanted ); - gdp::ExtensionsManager * extensionManager = gdp::ExtensionsManager::getInstance(); ObjSPtr newObject = boost::shared_ptr (); //Creation of the object if ( IDsceneObject != -1) - newObject = extensionManager->CreateObject(scene.initialObjects[IDsceneObject]); + newObject = scene.initialObjects[IDsceneObject]->Clone(); else if ( IDglobalObject != -1) - newObject = extensionManager->CreateObject(scene.game->globalObjects[IDglobalObject]); + newObject = scene.game->globalObjects[IDglobalObject]->Clone(); else { wxLogWarning(_("Impossible de créer l'objet.")); @@ -666,8 +665,8 @@ void DebuggerGUI::OnAddObjBtClick( wxCommandEvent & event ) //Initialisation newObject->errors = &scene.errors; - int x = toInt(string(wxGetTextFromUser(_("Entrez la position X de l'objet"), _("Ajout d'un objet")).mb_str())); - int y = toInt(string(wxGetTextFromUser(_("Entrez la position Y de l'objet"), _("Ajout d'un objet")).mb_str())); + int x = ToInt(string(wxGetTextFromUser(_("Entrez la position X de l'objet"), _("Ajout d'un objet")).mb_str())); + int y = ToInt(string(wxGetTextFromUser(_("Entrez la position Y de l'objet"), _("Ajout d'un objet")).mb_str())); newObject->SetX( x ); newObject->SetY( y ); diff --git a/IDE/EditLayer.cpp b/IDE/EditLayer.cpp index 3086fff078..6bf70581ac 100644 --- a/IDE/EditLayer.cpp +++ b/IDE/EditLayer.cpp @@ -7,7 +7,7 @@ //*) #include #include -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" //(*IdInit(EditLayer) const long EditLayer::ID_STATICTEXT1 = wxNewId(); @@ -168,7 +168,7 @@ tempLayer(layer_) for (unsigned int i = 0;iAppend(toString(i)); + cameraChoice->Append(ToString(i)); cameraChoice->SetSelection(0); RefreshCameraSettings(); @@ -204,7 +204,7 @@ void EditLayer::OnokBtClick(wxCommandEvent& event) void EditLayer::OnaddCameraBtClick(wxCommandEvent& event) { - cameraChoice->Append(toString(tempLayer.GetCamerasNumber())); + cameraChoice->Append(ToString(tempLayer.GetCamerasNumber())); tempLayer.SetCamerasNumber(tempLayer.GetCamerasNumber()+1); } @@ -235,8 +235,8 @@ void EditLayer::RefreshCameraSettings() cameraWidthEdit->Enable(true); cameraHeightEdit->Enable(true); - cameraWidthEdit->ChangeValue(toString(camera.size.x)); - cameraHeightEdit->ChangeValue(toString(camera.size.y)); + cameraWidthEdit->ChangeValue(ToString(camera.size.x)); + cameraHeightEdit->ChangeValue(ToString(camera.size.y)); } viewportX1Edit->SetBackgroundColour(wxColour(255,255,255)); @@ -264,10 +264,10 @@ void EditLayer::RefreshCameraSettings() viewportY1Edit->Enable(true); viewportY2Edit->Enable(true); - viewportX1Edit->ChangeValue(toString(camera.viewport.Left)); - viewportY1Edit->ChangeValue(toString(camera.viewport.Top)); - viewportX2Edit->ChangeValue(toString(camera.viewport.Right)); - viewportY2Edit->ChangeValue(toString(camera.viewport.Bottom)); + viewportX1Edit->ChangeValue(ToString(camera.viewport.Left)); + viewportY1Edit->ChangeValue(ToString(camera.viewport.Top)); + viewportX2Edit->ChangeValue(ToString(camera.viewport.Right)); + viewportY2Edit->ChangeValue(ToString(camera.viewport.Bottom)); } } diff --git a/IDE/EditOptionsPosition.cpp b/IDE/EditOptionsPosition.cpp index 272ac2280c..d9fa243760 100644 --- a/IDE/EditOptionsPosition.cpp +++ b/IDE/EditOptionsPosition.cpp @@ -12,7 +12,7 @@ #include "GDL/Chercher.h" #include "GDL/Game.h" #include "GDL/Scene.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "GDL/HelpFileAccess.h" #include #include @@ -211,10 +211,10 @@ scene(scene_) //Initializing controls with values objectNameTxt->SetLabel( position.objectName ); - XEdit->ChangeValue( toString(position.x) ); - YEdit->ChangeValue( toString(position.y) ); - widthEdit->ChangeValue( toString(position.width) ); - heightEdit->ChangeValue( toString(position.height) ); + XEdit->ChangeValue( ToString(position.x) ); + YEdit->ChangeValue( ToString(position.y) ); + widthEdit->ChangeValue( ToString(position.width) ); + heightEdit->ChangeValue( ToString(position.height) ); if ( position.personalizedSize ) { sizeCheck->SetValue(true); @@ -234,7 +234,7 @@ scene(scene_) if ( position.layer == "" ) layerChoice->SetStringSelection(_("Calque de base")); - zOrderEdit->ChangeValue( st(position.zOrder) ); + zOrderEdit->ChangeValue(ToString(position.zOrder) ); //Create the object-specific panel, if it has one. wxPanel * returnedPanel = NULL; @@ -308,7 +308,7 @@ void EditOptionsPosition::OnOkBtClick(wxCommandEvent& event) else position.personalizedSize = false; - position.zOrder = toInt(string(zOrderEdit->GetValue().mb_str())); + position.zOrder = ToInt(string(zOrderEdit->GetValue().mb_str())); position.layer = static_cast(layerChoice->GetStringSelection()); if ( layerChoice->GetStringSelection() == _("Calque de base")) diff --git a/IDE/EditPropJeu.cpp b/IDE/EditPropJeu.cpp index bd7ca532ca..c4f4d3e47b 100644 --- a/IDE/EditPropJeu.cpp +++ b/IDE/EditPropJeu.cpp @@ -13,7 +13,7 @@ #include //*) #include "sstream" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include #include #include @@ -301,31 +301,31 @@ EditPropJeu::EditPropJeu( wxWindow* parent, Game * pJeu ) NomEdit->ChangeValue( m_jeu->name ); AuteurEdit->ChangeValue( m_jeu->author ); - HeightEdit->ChangeValue( st( m_jeu->windowHeight ) ); - WidthEdit->ChangeValue( st( m_jeu->windowWidth ) ); + HeightEdit->ChangeValue(ToString( m_jeu->windowHeight ) ); + WidthEdit->ChangeValue(ToString( m_jeu->windowWidth ) ); afficherEcranCheck->SetValue( true ); if ( !m_jeu->loadingScreen.afficher ) afficherEcranCheck->SetValue( false ); - widthECEdit->ChangeValue( st( m_jeu->loadingScreen.width ) ); - heightECEdit->ChangeValue( st( m_jeu->loadingScreen.height ) ); + widthECEdit->ChangeValue(ToString( m_jeu->loadingScreen.width ) ); + heightECEdit->ChangeValue(ToString( m_jeu->loadingScreen.height ) ); texteCheck->SetValue( true ); if ( !m_jeu->loadingScreen.texte ) texteCheck->SetValue( false ); - texteXPosEdit->ChangeValue( st( m_jeu->loadingScreen.texteXPos ) ); - texteYPosEdit->ChangeValue( st( m_jeu->loadingScreen.texteYPos ) ); + texteXPosEdit->ChangeValue(ToString( m_jeu->loadingScreen.texteXPos ) ); + texteYPosEdit->ChangeValue(ToString( m_jeu->loadingScreen.texteYPos ) ); texteEdit->ChangeValue( m_jeu->loadingScreen.texteChargement ); pourcentCheck->SetValue( false ); if ( m_jeu->loadingScreen.pourcent ) pourcentCheck->SetValue( true ); - pourcentXPosEdit->ChangeValue( st( m_jeu->loadingScreen.pourcentXPos ) ); - pourcentYPosEdit->ChangeValue( st( m_jeu->loadingScreen.pourcentYPos ) ); + pourcentXPosEdit->ChangeValue(ToString( m_jeu->loadingScreen.pourcentXPos ) ); + pourcentYPosEdit->ChangeValue(ToString( m_jeu->loadingScreen.pourcentYPos ) ); imageCheck->SetValue( false ); if ( m_jeu->loadingScreen.image ) diff --git a/IDE/EditTexte.cpp b/IDE/EditTexte.cpp index 2cec939ecb..76cf4de7b7 100644 --- a/IDE/EditTexte.cpp +++ b/IDE/EditTexte.cpp @@ -116,7 +116,14 @@ void EditTexte::OnAnnulerBtClick(wxCommandEvent& event) void EditTexte::OnOkBtClick(wxCommandEvent& event) { - texteFinal = static_cast(TexteEdit->GetValue()); + texteFinal = string(TexteEdit->GetValue().mb_str()); + + GDExpression expressionTest(texteFinal); + if ( !expressionTest.PrepareForTextEvaluationOnly(game, scene) ) + { + wxLogWarning(wxString(expressionTest.GetFirstErrorDuringPreprocessingText())); + } + EndModal(1); } diff --git a/IDE/EditorEvents.cpp b/IDE/EditorEvents.cpp index 2c6458a886..1b0d15c168 100644 --- a/IDE/EditorEvents.cpp +++ b/IDE/EditorEvents.cpp @@ -31,7 +31,7 @@ #include "GDL/Game.h" #include "GDL/ExtensionsManager.h" #include "GDL/StandardEvent.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "GDL/HelpFileAccess.h" #ifdef __WXMSW__ #include @@ -606,7 +606,7 @@ void EditorEvents::OnEventsPanelPaint( wxPaintEvent& event ) //On récupère la position de dessin initiale int Yposition = -( ScrollBar1->GetThumbPosition() ); int positionScrollbar = ScrollBar1->GetThumbPosition(); - int initialXposition = 2 + dc.GetTextExtent(st(events->size())).GetWidth() + 2 - horizontalScrollbar->GetThumbPosition(); + int initialXposition = 2 + dc.GetTextExtent(ToString(events->size())).GetWidth() + 2 - horizontalScrollbar->GetThumbPosition(); int maximalWidth = 0; //Setup renderings datas which are constants. @@ -652,7 +652,7 @@ void EditorEvents::DrawEvents(vector < BaseEventSPtr > & list, wxBufferedPaintDC if ( draw ) { dc.SetFont( eventsRenderingHelper->GetFont() ); - dc.DrawText(st(i+1), initialXposition-(dc.GetTextExtent(st(i+1)).GetWidth()+2), Yposition); + dc.DrawText(ToString(i+1), initialXposition-(dc.GetTextExtent(ToString(i+1)).GetWidth()+2), Yposition); } int width = EventsPanel->GetSize().x-initialXposition; @@ -923,6 +923,7 @@ void EditorEvents::OnMenuPasteSelected( wxCommandEvent& event ) eventsSelected.push_back(boost::tuples::make_tuple(events, events->size(), (vector *)NULL, 0)); Clipboard * clipboard = Clipboard::getInstance(); + if ( !clipboard->HasEvent() ) return; if ( boost::tuples::get<1>(eventsSelected[0]) < GetLastSelectedListOfEvents()->size() ) GetLastSelectedListOfEvents()->insert( GetLastSelectedListOfEvents()->begin() + boost::tuples::get<1>(eventsSelected[0]), clipboard->GetEvent() ); @@ -941,6 +942,7 @@ void EditorEvents::OnMenuPasteAfterSelected( wxCommandEvent& event ) eventsSelected.push_back(boost::tuples::make_tuple(events, events->size(), (vector *)NULL, 0)); Clipboard * clipboard = Clipboard::getInstance(); + if ( !clipboard->HasEvent() ) return; if ( boost::tuples::get<1>(eventsSelected[0])+1 < GetLastSelectedListOfEvents()->size() ) GetLastSelectedListOfEvents()->insert( GetLastSelectedListOfEvents()->begin() + boost::tuples::get<1>(eventsSelected[0])+1, clipboard->GetEvent() ); @@ -958,6 +960,8 @@ void EditorEvents::OnPasteAsASubEventSelected(wxCommandEvent& event) if ( eventsSelected.empty() || !GetLastSelectedEvent()->CanHaveSubEvents() ) return; Clipboard * clipboard = Clipboard::getInstance(); + if ( !clipboard->HasEvent() ) return; + GetLastSelectedEvent()->GetSubEvents().push_back( clipboard->GetEvent() ); ChangesMadeOnEvents(); diff --git a/IDE/EditorLayers.cpp b/IDE/EditorLayers.cpp index 9479381f53..f5ef1c2a3a 100644 --- a/IDE/EditorLayers.cpp +++ b/IDE/EditorLayers.cpp @@ -8,7 +8,7 @@ //*) #include #include -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "GDL/Position.h" #include "ObjectsOnBadLayerBox.h" #include "EditLayer.h" @@ -206,7 +206,7 @@ void EditorLayers::OnAddSelected(wxCommandEvent& event) while ( alreadyExist ) { ++nb; - name = _("Nouveau calque ") + toString(nb); + name = _("Nouveau calque ") + ToString(nb); alreadyExist = false; for (unsigned int i = 0;isize();++i) diff --git a/IDE/EditorObjectList.cpp b/IDE/EditorObjectList.cpp index 0161416b49..c344939073 100644 --- a/IDE/EditorObjectList.cpp +++ b/IDE/EditorObjectList.cpp @@ -25,14 +25,14 @@ #include "GDL/Object.h" #include "GDL/Chercher.h" #include "GDL/ExtensionsManager.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "MemTrace.h" #include "Clipboard.h" #include #include #include "EditorObjetsGroups.h" #include "GDL/BitmapGUIManager.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "DndTextObjectsEditor.h" #include "ObjectTypeChoice.h" #include "InitialVariablesDialog.h" @@ -472,7 +472,7 @@ void EditorObjectList::OnaddObjMenuISelected(wxCommandEvent& event) { i++; name = _("Nouvel objet")+wxString(" "); - wxString Num = st( i ); + wxString Num =ToString( i ); name += Num; } @@ -657,8 +657,7 @@ void EditorObjectList::OnPasteSelected(wxCommandEvent& event) } //Add a new object of selected type to objects list - gdp::ExtensionsManager * extensionsManager = gdp::ExtensionsManager::getInstance(); - ObjSPtr object = extensionsManager->CreateObject(clipboard->GetObject()); + ObjSPtr object = clipboard->GetObject()->Clone(); wxString name = _( "Copie de " ) + object->GetName(); int i = 0; @@ -668,7 +667,7 @@ void EditorObjectList::OnPasteSelected(wxCommandEvent& event) { i++; name = _( "Copie de " ) + object->GetName(); - wxString Num = st( i ); + wxString Num =ToString( i ); name += Num; diff --git a/IDE/EditorObjets.cpp b/IDE/EditorObjets.cpp index 6e47aecf57..056ebd9ac9 100644 --- a/IDE/EditorObjets.cpp +++ b/IDE/EditorObjets.cpp @@ -24,7 +24,7 @@ #include "GDL/Scene.h" #include "GDL/Object.h" #include "GDL/Chercher.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "MemTrace.h" #include "Clipboard.h" #include @@ -79,7 +79,7 @@ mainEditorCommand(mainEditorCommand_) globalNotebook->AddPage(globalObjectsGroups, _("Groupes globaux"), false); Notebook1->AddPage(sceneNotebook, _("Scène"), false); Notebook1->AddPage(globalNotebook, _("Global à tout le jeu"), false); - + Connect(wxEVT_SIZE,(wxObjectEventFunction)&EditorObjets::OnResize); //*) diff --git a/IDE/EditorObjetsGroups.cpp b/IDE/EditorObjetsGroups.cpp index 46c154a819..1ab0bd1754 100644 --- a/IDE/EditorObjetsGroups.cpp +++ b/IDE/EditorObjetsGroups.cpp @@ -18,7 +18,7 @@ #include "GDL/Object.h" #include "GDL/Game.h" #include "Game_Develop_EditorMain.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "EditObjectGroup.h" #include "GDL/HelpFileAccess.h" #ifdef __WXMSW__ @@ -359,7 +359,7 @@ void EditorObjetsGroups::OnAddGroupSelected(wxCommandEvent& event) != objectsGroups->end() ) { ++i; - name = _( "Nouveau groupe" )+" "+st (i); + name = _( "Nouveau groupe" )+" "+ ToString(i); } NewGroup.SetName( string(name.mb_str()) ); diff --git a/IDE/Fusion.cpp b/IDE/Fusion.cpp index 7390632e18..2ca6e534e8 100644 --- a/IDE/Fusion.cpp +++ b/IDE/Fusion.cpp @@ -21,7 +21,7 @@ #endif -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "GDL/Game.h" #include "GDL/ChercherScene.h" #include "GDL/OpenSaveGame.h" @@ -135,14 +135,14 @@ void Fusion::OnFusionBtClick(wxCommandEvent& event) { for(unsigned int i = 0;igames.size();++i) { OpenSaveGame save(*Frame->games[i]); - save.SaveToFile("recup"+toString(i)+".gdg"); + save.SaveToFile("recup"+ToString(i)+".gdg"); } } @@ -338,7 +338,7 @@ bool Game_Develop_EditorApp::OnExceptionInMainLoop() for (unsigned int i = 0;igames.size();++i) { OpenSaveGame save(*Frame->games[i]); - save.SaveToFile("recup"+toString(i)+".gdg"); + save.SaveToFile("recup"+ToString(i)+".gdg"); } } catch(...) diff --git a/IDE/Game_Develop_EditorMain.cpp b/IDE/Game_Develop_EditorMain.cpp index 09bbb979df..529bd7d1ee 100644 --- a/IDE/Game_Develop_EditorMain.cpp +++ b/IDE/Game_Develop_EditorMain.cpp @@ -57,7 +57,7 @@ extern MemTrace MemTracer; #endif #include "Game_Develop_EditorMain.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "GDL/ChercherScene.h" #include "GDL/OpenSaveGame.h" #include "GDL/EditorImages.h" diff --git a/IDE/Game_Develop_EditorMain.h b/IDE/Game_Develop_EditorMain.h index 7f6e8ee482..f82a145a18 100644 --- a/IDE/Game_Develop_EditorMain.h +++ b/IDE/Game_Develop_EditorMain.h @@ -44,7 +44,7 @@ #include "GDL/Game.h" #include "GDL/OpenSaveGame.h" #include -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "RecentList.h" class RuntimeGame; class ProjectManager; diff --git a/IDE/GridSetup.cpp b/IDE/GridSetup.cpp index 638a2bdc7a..9986f40fc7 100644 --- a/IDE/GridSetup.cpp +++ b/IDE/GridSetup.cpp @@ -6,7 +6,7 @@ //*) #include #include -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" //(*IdInit(GridSetup) const long GridSetup::ID_STATICTEXT3 = wxNewId(); @@ -89,8 +89,8 @@ b(b_) //*) snapCheck->SetValue(snap); - widthEdit->ChangeValue(toString(gridWidth)); - heightEdit->ChangeValue(toString(gridHeight)); + widthEdit->ChangeValue(ToString(gridWidth)); + heightEdit->ChangeValue(ToString(gridHeight)); colorPanel->SetBackgroundColour( wxColor(r,g,b) ); } @@ -104,19 +104,19 @@ GridSetup::~GridSetup() void GridSetup::OnokBtClick(wxCommandEvent& event) { snap = snapCheck->GetValue(); - if ( toInt(static_cast(widthEdit->GetValue())) < 1) + if ( ToInt(static_cast(widthEdit->GetValue())) < 1) { wxLogWarning(_("La largeur de la grille est incorrecte.")); return; } - if ( toInt(static_cast(heightEdit->GetValue())) < 1) + if ( ToInt(static_cast(heightEdit->GetValue())) < 1) { wxLogWarning(_("La hauteur de la grille est incorrecte.")); return; } - gridWidth = toInt(static_cast(widthEdit->GetValue())); - gridHeight = toInt(static_cast(heightEdit->GetValue())); + gridWidth = ToInt(static_cast(widthEdit->GetValue())); + gridHeight = ToInt(static_cast(heightEdit->GetValue())); EndModal(1); } diff --git a/IDE/IDE.depend b/IDE/IDE.depend index d4c9327962..9cfc48fd3b 100644 --- a/IDE/IDE.depend +++ b/IDE/IDE.depend @@ -279,7 +279,7 @@ -1271877975 d:\florian\programmation\gamedevelop\gdl\gdl\runtimescene.h +1273765125 d:\florian\programmation\gamedevelop\gdl\gdl\runtimescene.h "GDL/MemTrace.h" @@ -291,7 +291,7 @@ "GDL/ImageManager.h" "GDL/Object.h" "GDL/Event.h" - "GDL/algo.h" + "GDL/CommonTools.h" "GDL/Son.h" "GDL/Music.h" "GDL/constantes.h" @@ -1513,7 +1513,7 @@ "GDL/Position.h" "GDL/Layer.h" -1272661219 d:\florian\programmation\gamedevelop\gdl\gdl\event.h +1273756713 d:\florian\programmation\gamedevelop\gdl\gdl\event.h @@ -1528,24 +1528,27 @@ -1267911590 d:\florian\programmation\gamedevelop\gdl\gdl\instruction.h +1273756713 d:\florian\programmation\gamedevelop\gdl\gdl\instruction.h "GDL/GDExpression.h" -1272913961 d:\florian\programmation\gamedevelop\gdl\gdl\gdexpression.h +1274120260 d:\florian\programmation\gamedevelop\gdl\gdl\gdexpression.h "GDL/GDMathParser.h" "GDL/ExpressionInstruction.h" + "GDL/StrExpressionInstruction.h" "GDL/ObjectIdentifiersManager.h" -1272998565 d:\florian\programmation\gamedevelop\gdl\gdl\gdmathparser.h +1274009870 d:\florian\programmation\gamedevelop\gdl\gdl\gdmathparser.h "GDL/fparser/fparser.hh" + + "gpl.h" 1265744838 d:\florian\programmation\gamedevelop\gdl\gdl\fparser\fparser.hh @@ -1555,7 +1558,12 @@ 1264364228 d:\florian\programmation\gamedevelop\gdl\gdl\gpl.h -1264364232 d:\florian\programmation\gamedevelop\gdl\gdl\expressioninstruction.h +1273874412 d:\florian\programmation\gamedevelop\gdl\gdl\expressioninstruction.h + + + + +1273948898 d:\florian\programmation\gamedevelop\gdl\gdl\strexpressioninstruction.h @@ -5006,7 +5014,7 @@ 1253308487 c:\libs\wxwidgets\include\wx\osx\config_xcode.h -1253308462 c:\libs\wxwidgets\lib\gcc_dll\msw\wx\setup.h +1253308462 c:\libs\wxwidgets\lib\gcc_dll\mswd\wx\setup.h 1253308518 c:\libs\wxwidgets\include\wx\setup_gccxml.h @@ -6127,7 +6135,7 @@ 1253308521 c:\libs\wxwidgets\include\wx\dcclient.h "wx/dc.h" -1268859962 d:\florian\programmation\gamedevelop\gdl\gdl\object.h +1273865631 d:\florian\programmation\gamedevelop\gdl\gdl\object.h @@ -8005,13 +8013,13 @@ -1267820376 d:\florian\programmation\gamedevelop\gdl\gdl\algo.h - +1273962369 d:\florian\programmation\gamedevelop\gdl\gdl\commontools.h + - "GDL/Object.h" - + "GDL/Image.h" + 1264364228 d:\florian\programmation\gamedevelop\gdl\gdl\son.h @@ -8257,7 +8265,7 @@ -1272817225 source:d:\florian\programmation\gamedevelop\ide\choixaction.cpp +1273765162 source:d:\florian\programmation\gamedevelop\ide\choixaction.cpp "ChoixAction.h" @@ -8276,7 +8284,7 @@ "GDL/gdTreeItemStringData.h" "Extensions.h" "GDL/HelpFileAccess.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "GDL/TranslateAction.h" "GDL/Scene.h" "GDL/Game.h" @@ -8715,14 +8723,6 @@ "wx/filesys.h" "wx/hashmap.h" -1267820206 d:\florian\programmation\gamedevelop\gdl\gdl\stdalgo.h - - - - - "GDL/Image.h" - - 1271188947 d:\florian\programmation\gamedevelop\gdl\gdl\translateaction.h @@ -8730,7 +8730,7 @@ "GDL/Instruction.h" -1270477350 d:\florian\programmation\gamedevelop\gdl\gdl\extensionsmanager.h +1273867366 d:\florian\programmation\gamedevelop\gdl\gdl\extensionsmanager.h @@ -8738,7 +8738,7 @@ "GDL/ExtensionBase.h" -1272219222 d:\florian\programmation\gamedevelop\gdl\gdl\extensionbase.h +1273949149 d:\florian\programmation\gamedevelop\gdl\gdl\extensionbase.h @@ -8860,7 +8860,7 @@ -1272817390 source:d:\florian\programmation\gamedevelop\ide\choixcondition.cpp +1273765162 source:d:\florian\programmation\gamedevelop\ide\choixcondition.cpp "debugMem.h" "CppUnitLite/TestHarness.h" "ChoixCondition.h" @@ -8893,7 +8893,7 @@ "Extensions.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "MemTrace.h" "GDL/Scene.h" "GDL/Game.h" @@ -8979,7 +8979,7 @@ -1271882921 source:d:\florian\programmation\gamedevelop\ide\choixtemplateevent.cpp +1273766515 source:d:\florian\programmation\gamedevelop\ide\choixtemplateevent.cpp "ChoixTemplateEvent.h" @@ -8992,7 +8992,7 @@ "tinyxml.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "GDL/OpenSaveGame.h" "TemplateEvents.h" "GDL/HelpFileAccess.h" @@ -9015,11 +9015,11 @@ -1271006256 d:\florian\programmation\gamedevelop\gdl\gdl\opensavegame.h +1273765125 d:\florian\programmation\gamedevelop\gdl\gdl\opensavegame.h "GDL/Game.h" "GDL/tinyxml.h" - "GDL/algo.h" + "GDL/CommonTools.h" 1272726603 source:d:\florian\programmation\gamedevelop\ide\choixvariabledialog.cpp "ChoixVariableDialog.h" @@ -9035,7 +9035,7 @@ "GDL/ListVariable.h" -1272310878 source:d:\florian\programmation\gamedevelop\ide\clipboard.cpp +1273866307 source:d:\florian\programmation\gamedevelop\ide\clipboard.cpp "Clipboard.h" "MemTrace.h" @@ -9234,7 +9234,7 @@ -1270751320 source:d:\florian\programmation\gamedevelop\ide\createtemplate.cpp +1273765162 source:d:\florian\programmation\gamedevelop\ide\createtemplate.cpp "CreateTemplate.h" @@ -9250,7 +9250,7 @@ "GDL/Game.h" "GDL/OpenSaveGame.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" 1270750594 d:\florian\programmation\gamedevelop\ide\createtemplate.h @@ -9272,7 +9272,7 @@ "tinyxml.h" -1272038411 source:d:\florian\programmation\gamedevelop\ide\debuggergui.cpp +1273866306 source:d:\florian\programmation\gamedevelop\ide\debuggergui.cpp "DebuggerGUI.h" @@ -9281,7 +9281,7 @@ - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "GDL/ExtensionsManager.h" "GDL/Chercher.h" @@ -9305,7 +9305,7 @@ "GDL/BaseDebugger.h" -1267217460 source:d:\florian\programmation\gamedevelop\ide\demarrage.cpp +1273596113 source:d:\florian\programmation\gamedevelop\ide\demarrage.cpp "Demarrage.h" "nommgr.h" @@ -9395,7 +9395,7 @@ -1271977551 d:\florian\programmation\gamedevelop\ide\game_develop_editormain.h +1273765162 d:\florian\programmation\gamedevelop\ide\game_develop_editormain.h @@ -9422,7 +9422,7 @@ "GDL/Game.h" "GDL/OpenSaveGame.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "RecentList.h" 1253308436 c:\libs\wxwidgets\include\wx\aui\aui.h @@ -9596,7 +9596,7 @@ -1266689736 d:\florian\programmation\gamedevelop\ide\scenecanvas.h +1273765128 d:\florian\programmation\gamedevelop\ide\scenecanvas.h "wxSFMLCanvas.hpp" @@ -9612,7 +9612,7 @@ "GDL/Collisions.h" "GDL/Event.h" "GDL/Chercher.h" - "GDL/algo.h" + "GDL/CommonTools.h" "GDL/Game.h" "GDL/RuntimeScene.h" "GDL/ImageManager.h" @@ -9632,7 +9632,7 @@ "GDL/SpriteObject.h" -1267821792 d:\florian\programmation\gamedevelop\gdl\gdl\spriteobject.h +1273865784 d:\florian\programmation\gamedevelop\gdl\gdl\spriteobject.h "GDL/Object.h" 1271883269 d:\florian\programmation\gamedevelop\ide\editorobjets.h @@ -9757,14 +9757,14 @@ 1264364134 d:\florian\programmation\gamedevelop\ide\dndtextsceneeditor.h -1272818391 source:d:\florian\programmation\gamedevelop\ide\editlayer.cpp +1273766515 source:d:\florian\programmation\gamedevelop\ide\editlayer.cpp "EditLayer.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" 1266348292 d:\florian\programmation\gamedevelop\ide\editlayer.h @@ -9813,7 +9813,7 @@ -1272817390 source:d:\florian\programmation\gamedevelop\ide\editoptionsposition.cpp +1273766515 source:d:\florian\programmation\gamedevelop\ide\editoptionsposition.cpp "EditOptionsPosition.h" @@ -9825,7 +9825,7 @@ "GDL/Chercher.h" "GDL/Game.h" "GDL/Scene.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "GDL/HelpFileAccess.h" @@ -9843,7 +9843,7 @@ "GDL/Position.h" "GDL/Object.h" -1272818477 source:d:\florian\programmation\gamedevelop\ide\editpropjeu.cpp +1273765162 source:d:\florian\programmation\gamedevelop\ide\editpropjeu.cpp "EditPropJeu.h" "nommgr.h" @@ -9853,7 +9853,7 @@ "sstream" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" @@ -9964,14 +9964,7 @@ "GDL/Scene.h" -1272817738 source:d:\florian\programmation\gamedevelop\ide\edittexte.cpp - "EditTexte.h" - - - "GDL/EditExpression.h" - - -1272662477 source:d:\florian\programmation\gamedevelop\ide\editorevents.cpp +1273767117 source:d:\florian\programmation\gamedevelop\ide\editorevents.cpp "debugMem.h" "CppUnitLite/TestHarness.h" "EditorEvents.h" @@ -9993,7 +9986,7 @@ "GDL/Game.h" "GDL/ExtensionsManager.h" "GDL/StandardEvent.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "GDL/HelpFileAccess.h" "Clipboard.h" @@ -10037,7 +10030,7 @@ -1272661220 d:\florian\programmation\gamedevelop\gdl\gdl\standardevent.h +1273756713 d:\florian\programmation\gamedevelop\gdl\gdl\standardevent.h @@ -10067,7 +10060,7 @@ -1266691614 source:d:\florian\programmation\gamedevelop\ide\editorlayers.cpp +1273766515 source:d:\florian\programmation\gamedevelop\ide\editorlayers.cpp "EditorLayers.h" @@ -10075,7 +10068,7 @@ - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "GDL/Position.h" "ObjectsOnBadLayerBox.h" "EditLayer.h" @@ -10093,7 +10086,7 @@ "GDL/Layer.h" -1270318868 source:d:\florian\programmation\gamedevelop\ide\editorobjectlist.cpp +1273866307 source:d:\florian\programmation\gamedevelop\ide\editorobjectlist.cpp "EditorObjectList.h" @@ -10116,14 +10109,14 @@ "GDL/Object.h" "GDL/Chercher.h" "GDL/ExtensionsManager.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "MemTrace.h" "Clipboard.h" "EditorObjetsGroups.h" "GDL/BitmapGUIManager.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "DndTextObjectsEditor.h" "ObjectTypeChoice.h" "InitialVariablesDialog.h" @@ -10157,7 +10150,7 @@ "GDL/ListVariable.h" -1272055414 source:d:\florian\programmation\gamedevelop\ide\editorobjets.cpp +1273765162 source:d:\florian\programmation\gamedevelop\ide\editorobjets.cpp "debugMem.h" "EditorObjets.h" @@ -10173,7 +10166,7 @@ "GDL/Scene.h" "GDL/Object.h" "GDL/Chercher.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "MemTrace.h" "Clipboard.h" @@ -10182,7 +10175,7 @@ "GDL/BitmapGUIManager.h" -1267217462 source:d:\florian\programmation\gamedevelop\ide\editorobjetsgroups.cpp +1273771285 source:d:\florian\programmation\gamedevelop\ide\editorobjetsgroups.cpp "EditorObjetsGroups.h" @@ -10200,7 +10193,7 @@ "GDL/Object.h" "GDL/Game.h" "Game_Develop_EditorMain.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "EditObjectGroup.h" "GDL/HelpFileAccess.h" @@ -10279,7 +10272,7 @@ -1267283858 source:d:\florian\programmation\gamedevelop\ide\fusion.cpp +1273765322 source:d:\florian\programmation\gamedevelop\ide\fusion.cpp "Fusion.h" "nommgr.h" @@ -10287,7 +10280,7 @@ - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "GDL/Game.h" "GDL/ChercherScene.h" "GDL/OpenSaveGame.h" @@ -10325,7 +10318,7 @@ -1272198779 source:d:\florian\programmation\gamedevelop\ide\game_develop_editorapp.cpp +1273766515 source:d:\florian\programmation\gamedevelop\ide\game_develop_editorapp.cpp "debugMem.h" @@ -10471,7 +10464,7 @@ 1264364230 d:\florian\programmation\gamedevelop\gdl\gdl\spriteextension.h -1271977551 source:d:\florian\programmation\gamedevelop\ide\game_develop_editormain.cpp +1273765162 source:d:\florian\programmation\gamedevelop\ide\game_develop_editormain.cpp "debugMem.h" "MemTrace.h" "nommgr.h" @@ -10504,7 +10497,7 @@ "GDAuiTabArt.h" "Game_Develop_EditorMain.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "GDL/ChercherScene.h" "GDL/OpenSaveGame.h" "GDL/EditorImages.h" @@ -10577,13 +10570,13 @@ -1272817738 source:d:\florian\programmation\gamedevelop\ide\gridsetup.cpp +1273766515 source:d:\florian\programmation\gamedevelop\ide\gridsetup.cpp "GridSetup.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" 1264364136 source:d:\florian\programmation\gamedevelop\ide\imageeditor.cpp "ImageEditor.h" @@ -10593,7 +10586,7 @@ 1264364132 d:\florian\programmation\gamedevelop\ide\imageeditor.h -1272817738 source:d:\florian\programmation\gamedevelop\ide\importimage.cpp +1273771433 source:d:\florian\programmation\gamedevelop\ide\importimage.cpp "ImportImage.h" @@ -10605,7 +10598,7 @@ - "GDL/StdAlgo.h" + "GDL/CommonTools.h" 1264364134 d:\florian\programmation\gamedevelop\ide\importimage.h @@ -10655,7 +10648,7 @@ "GDL/ListVariable.h" -1272817738 source:d:\florian\programmation\gamedevelop\ide\maj.cpp +1273771433 source:d:\florian\programmation\gamedevelop\ide\maj.cpp "MAJ.h" @@ -10665,7 +10658,7 @@ "CheckMAJ.h" "tinyxml.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" "GDL/VersionWrapper.h" @@ -10864,7 +10857,7 @@ "GDL/Layer.h" -1272727005 source:d:\florian\programmation\gamedevelop\ide\playerunittests.cpp +1273758351 source:d:\florian\programmation\gamedevelop\ide\playerunittests.cpp "CppUnitLite/TestHarness.h" "GDL/Object.h" "GDL/aMove.h" @@ -10880,7 +10873,7 @@ "windows.h" -1264364228 d:\florian\programmation\gamedevelop\gdl\gdl\amove.h +1273765126 d:\florian\programmation\gamedevelop\gdl\gdl\amove.h "GDL/Object.h" @@ -10889,7 +10882,7 @@ "GDL/Chercher.h" - "GDL/algo.h" + "GDL/CommonTools.h" "GDL/Force.h" "GDL/Access.h" @@ -10899,7 +10892,7 @@ "GDL/RuntimeScene.h" "GDL/Game.h" -1264364232 d:\florian\programmation\gamedevelop\gdl\gdl\cmove.h +1273765127 d:\florian\programmation\gamedevelop\gdl\gdl\cmove.h "GDL/Object.h" @@ -10908,7 +10901,7 @@ "GDL/Chercher.h" - "GDL/algo.h" + "GDL/CommonTools.h" "GDL/Force.h" "GDL/Access.h" @@ -10960,7 +10953,7 @@ -1272564979 source:d:\florian\programmation\gamedevelop\ide\projectmanager.cpp +1273766515 source:d:\florian\programmation\gamedevelop\ide\projectmanager.cpp "ProjectManager.h" @@ -10986,13 +10979,13 @@ 1264364134 source:d:\florian\programmation\gamedevelop\ide\recentlist.cpp "RecentList.h" -1266012842 source:d:\florian\programmation\gamedevelop\ide\renderdialog.cpp +1273689571 source:d:\florian\programmation\gamedevelop\ide\renderdialog.cpp "RenderDialog.h" -1272036062 source:d:\florian\programmation\gamedevelop\ide\scenecanvas.cpp +1273866307 source:d:\florian\programmation\gamedevelop\ide\scenecanvas.cpp "SceneCanvas.h" @@ -11007,8 +11000,8 @@ "GDL/Chercher.h" - "GDL/algo.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" + "GDL/CommonTools.h" "EditOptionsPosition.h" @@ -11096,9 +11089,9 @@ "wx/msw/rcdefs.h" "version.h" -1263937643 c:\libs\wxwidgets\lib\gcc_dll\msw\wx\msw\rcdefs.h +1253437186 c:\libs\wxwidgets\lib\gcc_dll\mswd\wx\msw\rcdefs.h -1272742095 d:\florian\programmation\gamedevelop\ide\version.h +1274123673 d:\florian\programmation\gamedevelop\ide\version.h 1264364132 source:d:\florian\programmation\gamedevelop\ide\tinystr.cpp "tinystr.h" @@ -11230,7 +11223,7 @@ 1259350652 c:\libs\sfml\include\sfml\network\selector.inl -1267300288 source:d:\florian\programmation\gamedevelop\ide\credits.cpp +1273596141 source:d:\florian\programmation\gamedevelop\ide\credits.cpp "Credits.h" @@ -11243,11 +11236,23 @@ -1272051368 source:d:\florian\programmation\gamedevelop\ide\compilationchecker.cpp +1273766515 source:d:\florian\programmation\gamedevelop\ide\compilationchecker.cpp "CompilationChecker.h" "GDL/Version.h" "GDL/VersionWrapper.h" - "GDL/StdAlgo.h" + "GDL/CommonTools.h" -1272998934 d:\florian\programmation\gamedevelop\gdl\gdl\version.h +1274120855 d:\florian\programmation\gamedevelop\gdl\gdl\version.h + +1253308462 c:\libs\wxwidgets\lib\gcc_dll\msw\wx\setup.h + +1274122190 source:d:\florian\programmation\gamedevelop\ide\edittexte.cpp + "EditTexte.h" + + + "GDL/EditExpression.h" + "GDL/RuntimeScene.h" + + +1263937643 c:\libs\wxwidgets\lib\gcc_dll\msw\wx\msw\rcdefs.h diff --git a/IDE/IDE.layout b/IDE/IDE.layout index 32e053ca3e..62a4176353 100644 --- a/IDE/IDE.layout +++ b/IDE/IDE.layout @@ -1,6 +1,6 @@ - + @@ -20,16 +20,16 @@ - + - + - - + + @@ -37,8 +37,8 @@ - - + + @@ -49,8 +49,8 @@ - - + + @@ -65,7 +65,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -85,14 +85,14 @@ - - + + - - + + @@ -100,26 +100,26 @@ - - + + - + - - + + - - + + @@ -130,26 +130,26 @@ - - + + - - + + - + - - + + @@ -172,8 +172,8 @@ - - + + @@ -182,31 +182,31 @@ - + - + - + - - + + - - + + - - + + @@ -224,7 +224,7 @@ - + @@ -232,23 +232,23 @@ - - + + - - + + - - + + - + diff --git a/IDE/ImportImage.cpp b/IDE/ImportImage.cpp index be227bf63b..07c086d9a5 100644 --- a/IDE/ImportImage.cpp +++ b/IDE/ImportImage.cpp @@ -13,7 +13,7 @@ #include #include -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" //(*IdInit(ImportImage) @@ -359,7 +359,7 @@ void ImportImage::OnFileGIFEditText(wxCommandEvent& event) { wxAnimation animation; if ( animation.LoadFile(FileGIFEdit->GetValue()) ) - nbImageGIFBt->SetLabel(_("Nombre d'images : ")+st(animation.GetFrameCount())); + nbImageGIFBt->SetLabel(_("Nombre d'images : ")+ToString(animation.GetFrameCount())); else nbImageGIFBt->SetLabel(_("Nombre d'images : ?")); } @@ -382,7 +382,7 @@ void ImportImage::OnDecomposeGIFBtClick(wxCommandEvent& event) for (unsigned int i = 0;iGetValue()+st(i)+".png", wxBITMAP_TYPE_PNG); + img.SaveFile(path+"/"+DecomposeGIFEdit->GetValue()+ToString(i)+".png", wxBITMAP_TYPE_PNG); } wxLogMessage(_("Décomposition du GIF terminé !")); @@ -419,7 +419,7 @@ void ImportImage::OnfileRPGEditText(wxCommandEvent& event) { wxImage image; if ( image.LoadFile(fileRPGEdit->GetValue()) ) - tailleImageRPGEdit->SetLabel(_("Taille d'une image : ")+st(image.GetWidth()/4)+"x"+st(image.GetHeight()/4)); + tailleImageRPGEdit->SetLabel(_("Taille d'une image : ")+ToString(image.GetWidth()/4)+"x"+ToString(image.GetHeight()/4)); else tailleImageRPGEdit->SetLabel(_("Taille d'une image : ?x?")); } @@ -455,7 +455,7 @@ void ImportImage::OnDecomposeRPGEditClick(wxCommandEvent& event) if ( j == 1 ) direc = "L"; if ( j == 2 ) direc = "R"; if ( j == 3 ) direc = "U"; - subImage.SaveFile(path+"/"+decomposeRPGEdit->GetValue()+direc+st(i)+".png", wxBITMAP_TYPE_PNG); + subImage.SaveFile(path+"/"+decomposeRPGEdit->GetValue()+direc+ToString(i)+".png", wxBITMAP_TYPE_PNG); } } @@ -483,38 +483,38 @@ void ImportImage::OnDecomposeSSBtClick(wxCommandEvent& event) wxFileName filename(fileSSEdit->GetValue()); wxString path = filename.GetPath(); - int lineNb = toInt(static_cast(linesSSEdit->GetValue())); + int lineNb = ToInt(static_cast(linesSSEdit->GetValue())); if ( lineNb <= 0 ) { wxLogWarning(_("Le nombre de ligne est invalide : Le minimum est une ligne.")); return; } - int columnNb = toInt(static_cast(columnsSSEdit->GetValue())); + int columnNb = ToInt(static_cast(columnsSSEdit->GetValue())); if ( columnNb <= 0 ) { wxLogWarning(_("Le nombre de colonnes est invalide : Le minimum est une colonne.")); return; } - int origineX = toInt(static_cast(origineXEdit->GetValue())); - int origineY = toInt(static_cast(origineYEdit->GetValue())); + int origineX = ToInt(static_cast(origineXEdit->GetValue())); + int origineY = ToInt(static_cast(origineYEdit->GetValue())); - int width = toInt(static_cast(widthSSEdit->GetValue())); - int height = toInt(static_cast(heightSSEdit->GetValue())); + int width = ToInt(static_cast(widthSSEdit->GetValue())); + int height = ToInt(static_cast(heightSSEdit->GetValue())); if ( width <= 0 || height <= 0) { wxLogWarning(_("La taille d'un sprite est invalide.")); return; } - int spaceH = toInt(static_cast(spaceHSSEdit->GetValue())); + int spaceH = ToInt(static_cast(spaceHSSEdit->GetValue())); if ( spaceH < 0 ) { wxLogWarning(_("L'espacement horizontal est invalide ( doit être supérieur ou égal à 0 ).")); return; } - int spaceV = toInt(static_cast(spaceVSSEdit->GetValue())); + int spaceV = ToInt(static_cast(spaceVSSEdit->GetValue())); if ( spaceV < 0 ) { wxLogWarning(_("L'espacement vertical est invalide ( doit être supérieur ou égal à 0 ).")); @@ -534,7 +534,7 @@ void ImportImage::OnDecomposeSSBtClick(wxCommandEvent& event) imageRect.SetWidth(width); imageRect.SetHeight(height); - image.GetSubImage(imageRect).SaveFile(path+"/"+decomposeSSEdit->GetValue()+"l"+toString(line)+"c"+toString(column)+".png", wxBITMAP_TYPE_PNG); + image.GetSubImage(imageRect).SaveFile(path+"/"+decomposeSSEdit->GetValue()+"l"+ToString(line)+"c"+ToString(column)+".png", wxBITMAP_TYPE_PNG); X += width + spaceH; } diff --git a/IDE/MAJ.cpp b/IDE/MAJ.cpp index 26141b66b5..37a6526aa8 100644 --- a/IDE/MAJ.cpp +++ b/IDE/MAJ.cpp @@ -10,7 +10,7 @@ //*) #include "CheckMAJ.h" #include "tinyxml.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" #include "GDL/VersionWrapper.h" #include #include @@ -141,7 +141,7 @@ void MAJ::OnVerifMAJBtClick(wxCommandEvent& event) int Revision = 0; elem->QueryIntAttribute( "Revision", &Revision ); - versionMAJTxt->SetLabel(st(Major)+"."+st(Minor)+"."+st(Build)+"."+st(Revision)); + versionMAJTxt->SetLabel(ToString(Major)+"."+ToString(Minor)+"."+ToString(Build)+"."+ToString(Revision)); elem = hdl.FirstChildElement().FirstChildElement("Info").Element(); diff --git a/IDE/PlayerUnitTests.cpp b/IDE/PlayerUnitTests.cpp index 81b7cc534a..dc95a48338 100644 --- a/IDE/PlayerUnitTests.cpp +++ b/IDE/PlayerUnitTests.cpp @@ -169,8 +169,6 @@ TEST( Player, conditionsMove ) condition.SetParameters(params); condition.SetLocal(false); condition.SetInversion(false); - Evaluateur eval(game, scene); ObjectsConcerned objectsConcerned(&scene.objectsInstances, &scene.objectGroups); - eval.SetObjectsConcerned(&objectsConcerned); } diff --git a/IDE/ProjectManager.cpp b/IDE/ProjectManager.cpp index 2ba1d94729..03aec66885 100644 --- a/IDE/ProjectManager.cpp +++ b/IDE/ProjectManager.cpp @@ -244,7 +244,7 @@ void ProjectManager::Refresh() //Extensions gdTreeItemGameData * extensionsItemData = new gdTreeItemGameData("Extensions", "", mainEditor.games[i].get()); - projectsTree->AppendItem(projectItem, _("Extensions") + " (" + toString(mainEditor.games[i]->extensionsUsed.size()) + ")", 3 ,3, extensionsItemData); + projectsTree->AppendItem(projectItem, _("Extensions") + " (" + ToString(mainEditor.games[i]->extensionsUsed.size()) + ")", 3 ,3, extensionsItemData); } projectsTree->ExpandAll(); @@ -309,7 +309,7 @@ void ProjectManager::OnprojectsTreeItemActivated(wxTreeEvent& event) { EditExtensionsOfGame(game); - projectsTree->SetItemText(selectedItem, _("Extensions") + " (" + toString(game->extensionsUsed.size()) + ")"); + projectsTree->SetItemText(selectedItem, _("Extensions") + " (" + ToString(game->extensionsUsed.size()) + ")"); } } @@ -595,7 +595,7 @@ void ProjectManager::AddSceneToGame(Game * game) int i = 1; while(find_if(game->scenes.begin(), game->scenes.end(), bind2nd(SceneHasName(), newSceneName)) != game->scenes.end()) { - newSceneName = _("Nouvelle scène") + " " + toString(i); + newSceneName = _("Nouvelle scène") + " " + ToString(i); ++i; } @@ -790,7 +790,7 @@ void ProjectManager::OnpasteSceneMenuItemSelected(wxCommandEvent& event) int i = 1; while(find_if(game->scenes.begin(), game->scenes.end(), bind2nd(SceneHasName(), newSceneName)) != game->scenes.end()) { - newSceneName = _("Copie de") + " " + newScene->GetName() + " " + toString(i); + newSceneName = _("Copie de") + " " + newScene->GetName() + " " + ToString(i); ++i; } diff --git a/IDE/SceneCanvas.cpp b/IDE/SceneCanvas.cpp index d2ddb7a976..d1f74e99a4 100644 --- a/IDE/SceneCanvas.cpp +++ b/IDE/SceneCanvas.cpp @@ -12,8 +12,8 @@ #include #include #include "GDL/Chercher.h" -#include "GDL/algo.h" -#include "GDL/StdAlgo.h" +#include "GDL/CommonTools.h" +#include "GDL/CommonTools.h" #include "EditOptionsPosition.h" #include #include @@ -334,8 +334,8 @@ void SceneCanvas::OnMotion( wxMouseEvent &event ) { mouseXInScene = static_cast(sf::RenderWindow::ConvertCoords(scene.input->GetMouseX(), 0, scene.GetLayer("").GetCamera(0).GetSFMLView()).x); mouseYInScene = static_cast(sf::RenderWindow::ConvertCoords(0, scene.input->GetMouseY(), scene.GetLayer("").GetCamera(0).GetSFMLView()).y); - Xstr = st( mouseXInScene ); - Ystr = st( mouseYInScene ); + Xstr =ToString( mouseXInScene ); + Ystr =ToString( mouseYInScene ); wxLogStatus( wxString( _( "Position " ) ) + Xstr + wxString( _( ";" ) ) + Ystr + wxString( _( ". ( Calque de base, Caméra 0 )" ) ) ); } @@ -344,8 +344,8 @@ void SceneCanvas::OnMotion( wxMouseEvent &event ) mouseXInScene = static_cast(sf::RenderWindow::ConvertCoords(scene.input->GetMouseX(), 0).x); mouseYInScene = static_cast(sf::RenderWindow::ConvertCoords(0, scene.input->GetMouseY()).y); - Xstr = st( mouseXInScene ); - Ystr = st( mouseYInScene ); + Xstr =ToString( mouseXInScene ); + Ystr =ToString( mouseYInScene ); wxLogStatus( wxString( _( "Position " ) ) + Xstr + wxString( _( ";" ) ) + Ystr + wxString( _( ". SHIFT pour sélection multiple, clic droit pour plus d'options." ) ) ); } @@ -480,9 +480,9 @@ void SceneCanvas::AddObjetSelected(float x, float y) ObjSPtr newObject = boost::shared_ptr (); if ( IDsceneObject != -1 ) //We check first scene's objects' list. - newObject = extensionManager->CreateObject(sceneEdited.initialObjects[IDsceneObject]); + newObject = sceneEdited.initialObjects[IDsceneObject]->Clone(); else if ( IDglobalObject != -1 ) //Then the global object list - newObject = extensionManager->CreateObject(gameEdited.globalObjects[IDglobalObject]); + newObject = gameEdited.globalObjects[IDglobalObject]->Clone(); if ( newObject == boost::shared_ptr () ) { diff --git a/IDE/SceneCanvas.h b/IDE/SceneCanvas.h index e158633430..9bfb886f06 100644 --- a/IDE/SceneCanvas.h +++ b/IDE/SceneCanvas.h @@ -17,7 +17,7 @@ #include "GDL/Collisions.h" #include "GDL/Event.h" #include "GDL/Chercher.h" -#include "GDL/algo.h" +#include "GDL/CommonTools.h" #include "GDL/Game.h" #include "GDL/RuntimeScene.h" #include "GDL/ImageManager.h" diff --git a/IDE/version.h b/IDE/version.h index bf63efe900..719c387599 100644 --- a/IDE/version.h +++ b/IDE/version.h @@ -4,7 +4,7 @@ namespace AutoVersion{ //Date Version Types - static const char DATE[] = "12"; + static const char DATE[] = "17"; static const char MONTH[] = "05"; static const char YEAR[] = "2010"; static const char UBUNTU_VERSION_STYLE[] = "10.05"; @@ -16,14 +16,14 @@ namespace AutoVersion{ //Standard Version Type static const long MAJOR = 1; static const long MINOR = 3; - static const long BUILD = 9594; - static const long REVISION = 48340; + static const long BUILD = 9598; + static const long REVISION = 48355; //Miscellaneous Version Types - static const long BUILDS_COUNT = 21434; - #define RC_FILEVERSION 1,3,9594,48340 - #define RC_FILEVERSION_STRING "1, 3, 9594, 48340\0" - static const char FULLVERSION_STRING[] = "1.3.9594.48340"; + static const long BUILDS_COUNT = 21486; + #define RC_FILEVERSION 1,3,9598,48355 + #define RC_FILEVERSION_STRING "1, 3, 9598, 48355\0" + static const char FULLVERSION_STRING[] = "1.3.9598.48355"; //These values are to keep track of your versioning state, don't modify them. static const long BUILD_HISTORY = 0;