From 01a1353fe1fd617117371d81d90ead68d224baa6 Mon Sep 17 00:00:00 2001 From: Arseniy Shestakov Date: Mon, 3 Jul 2017 21:59:57 +0300 Subject: [PATCH] Cleanup: remove old editor code and adjust related project files It's useless and will fail build if accidentally enabled in CMake. For anyone interested it's always available in git history. --- CMakeLists.txt | 8 +- VCMI_VS10.sln | 105 ----------------------- VCMI_VS11.sln | 9 -- editor/CMakeLists.txt | 49 ----------- editor/ConfigWindows.cpp | 20 ----- editor/ConfigWindows.h | 23 ----- editor/Editor.cpp | 136 ------------------------------ editor/Editor.h | 30 ------- editor/Editor.vcxproj | 178 --------------------------------------- editor/Main.cpp | 11 --- editor/StdInc.cpp | 1 - editor/StdInc.h | 2 - editor/editor.qrc | 4 - editor/editor.ui | 29 ------- 14 files changed, 2 insertions(+), 603 deletions(-) delete mode 100644 VCMI_VS10.sln delete mode 100644 editor/CMakeLists.txt delete mode 100644 editor/ConfigWindows.cpp delete mode 100644 editor/ConfigWindows.h delete mode 100644 editor/Editor.cpp delete mode 100644 editor/Editor.h delete mode 100644 editor/Editor.vcxproj delete mode 100644 editor/Main.cpp delete mode 100644 editor/StdInc.cpp delete mode 100644 editor/StdInc.h delete mode 100644 editor/editor.qrc delete mode 100644 editor/editor.ui diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dd0f277b..2b8eb412b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,6 @@ set(PACKAGE_NAME_SUFFIX "" CACHE STRING "Suffix for CPack package name") set(PACKAGE_FILE_NAME "" CACHE STRING "Override for CPack package filename") option(ENABLE_ERM "Enable compilation of ERM scripting module" OFF) -option(ENABLE_EDITOR "Enable compilation of map editor" OFF) option(ENABLE_LAUNCHER "Enable compilation of launcher" ON) option(ENABLE_TEST "Enable compilation of unit tests" ON) option(ENABLE_PCH "Enable compilation using precompiled headers" ON) @@ -143,7 +142,7 @@ set(SDLMIXER_LIBRARY "${SDL2_MIXER_LIBRARY}") include(cotire) -if (ENABLE_EDITOR OR ENABLE_LAUNCHER) +if(ENABLE_LAUNCHER) # Widgets finds its own dependencies (QtGui and QtCore). find_package(Qt5Widgets REQUIRED) endif() @@ -225,9 +224,6 @@ add_subdirectory(lib) add_subdirectory(client) add_subdirectory(server) add_subdirectory(AI) -if (ENABLE_EDITOR) - add_subdirectory(editor) -endif() if (ENABLE_LAUNCHER) add_subdirectory(launcher) endif() @@ -265,7 +261,7 @@ if(WIN32) set(debug_postfix d) endif(CMAKE_BUILD_TYPE MATCHES DEBUG) - if (ENABLE_EDITOR OR ENABLE_LAUNCHER) + if(ENABLE_LAUNCHER) get_target_property(QtCore_location Qt5::Core LOCATION) get_filename_component(Qtbin_folder ${QtCore_location} PATH) file(GLOB dep_files diff --git a/VCMI_VS10.sln b/VCMI_VS10.sln deleted file mode 100644 index 2e8f81cfb..000000000 --- a/VCMI_VS10.sln +++ /dev/null @@ -1,105 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VCMI_client", "client\VCMI_client.vcxproj", "{8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VCMI_lib", "lib\VCMI_lib.vcxproj", "{B952FFC5-3039-4DE1-9F08-90ACDA483D8F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VCMI_server", "server\VCMI_server.vcxproj", "{8AF697C3-465E-4910-B31B-576A9ECDB309}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StupidAI", "AI\StupidAI\StupidAI.vcxproj", "{15DABC90-234A-4B6B-9EEB-777C4768B82B}" - ProjectSection(ProjectDependencies) = postProject - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} = {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ERM", "scripting\erm\ERM.vcxproj", "{8F202F43-106D-4F63-AD9D-B1D43E803E8C}" - ProjectSection(ProjectDependencies) = postProject - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} = {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VCAI", "AI\VCAI\VCAI.vcxproj", "{276C3DB0-7A6B-4417-8E5C-322B08633AAC}" - ProjectSection(ProjectDependencies) = postProject - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} = {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} - {D15B34EC-A32C-4968-9B0B-66998B579364} = {D15B34EC-A32C-4968-9B0B-66998B579364} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FuzzyLite", "AI\FuzzyLite\FuzzyLite.vcxproj", "{D15B34EC-A32C-4968-9B0B-66998B579364}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BattleAI", "AI\BattleAI\BattleAI.vcxproj", "{C0300513-E845-43B4-9A4F-E8817EAEF57C}" - ProjectSection(ProjectDependencies) = postProject - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} = {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - RD|Win32 = RD|Win32 - RD|x64 = RD|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}.Debug|Win32.Build.0 = Debug|Win32 - {8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}.Debug|x64.ActiveCfg = Debug|x64 - {8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}.Debug|x64.Build.0 = Debug|x64 - {8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}.RD|Win32.ActiveCfg = RD|Win32 - {8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}.RD|Win32.Build.0 = RD|Win32 - {8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}.RD|x64.ActiveCfg = RD|x64 - {8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}.RD|x64.Build.0 = RD|x64 - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F}.Debug|Win32.ActiveCfg = Debug|Win32 - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F}.Debug|Win32.Build.0 = Debug|Win32 - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F}.Debug|x64.ActiveCfg = Debug|x64 - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F}.Debug|x64.Build.0 = Debug|x64 - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F}.RD|Win32.ActiveCfg = RD|Win32 - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F}.RD|Win32.Build.0 = RD|Win32 - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F}.RD|x64.ActiveCfg = RD|x64 - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F}.RD|x64.Build.0 = RD|x64 - {8AF697C3-465E-4910-B31B-576A9ECDB309}.Debug|Win32.ActiveCfg = Debug|Win32 - {8AF697C3-465E-4910-B31B-576A9ECDB309}.Debug|Win32.Build.0 = Debug|Win32 - {8AF697C3-465E-4910-B31B-576A9ECDB309}.Debug|x64.ActiveCfg = Debug|x64 - {8AF697C3-465E-4910-B31B-576A9ECDB309}.Debug|x64.Build.0 = Debug|x64 - {8AF697C3-465E-4910-B31B-576A9ECDB309}.RD|Win32.ActiveCfg = RD|Win32 - {8AF697C3-465E-4910-B31B-576A9ECDB309}.RD|Win32.Build.0 = RD|Win32 - {8AF697C3-465E-4910-B31B-576A9ECDB309}.RD|x64.ActiveCfg = RD|x64 - {8AF697C3-465E-4910-B31B-576A9ECDB309}.RD|x64.Build.0 = RD|x64 - {15DABC90-234A-4B6B-9EEB-777C4768B82B}.Debug|Win32.ActiveCfg = Debug|Win32 - {15DABC90-234A-4B6B-9EEB-777C4768B82B}.Debug|Win32.Build.0 = Debug|Win32 - {15DABC90-234A-4B6B-9EEB-777C4768B82B}.Debug|x64.ActiveCfg = Debug|x64 - {15DABC90-234A-4B6B-9EEB-777C4768B82B}.Debug|x64.Build.0 = Debug|x64 - {15DABC90-234A-4B6B-9EEB-777C4768B82B}.RD|Win32.ActiveCfg = RD|Win32 - {15DABC90-234A-4B6B-9EEB-777C4768B82B}.RD|Win32.Build.0 = RD|Win32 - {15DABC90-234A-4B6B-9EEB-777C4768B82B}.RD|x64.ActiveCfg = RD|x64 - {15DABC90-234A-4B6B-9EEB-777C4768B82B}.RD|x64.Build.0 = RD|x64 - {8F202F43-106D-4F63-AD9D-B1D43E803E8C}.Debug|Win32.ActiveCfg = Debug|Win32 - {8F202F43-106D-4F63-AD9D-B1D43E803E8C}.Debug|Win32.Build.0 = Debug|Win32 - {8F202F43-106D-4F63-AD9D-B1D43E803E8C}.Debug|x64.ActiveCfg = Debug|x64 - {8F202F43-106D-4F63-AD9D-B1D43E803E8C}.Debug|x64.Build.0 = Debug|x64 - {8F202F43-106D-4F63-AD9D-B1D43E803E8C}.RD|Win32.ActiveCfg = RD|Win32 - {8F202F43-106D-4F63-AD9D-B1D43E803E8C}.RD|Win32.Build.0 = RD|Win32 - {8F202F43-106D-4F63-AD9D-B1D43E803E8C}.RD|x64.ActiveCfg = RD|x64 - {8F202F43-106D-4F63-AD9D-B1D43E803E8C}.RD|x64.Build.0 = RD|x64 - {276C3DB0-7A6B-4417-8E5C-322B08633AAC}.Debug|Win32.ActiveCfg = Debug|Win32 - {276C3DB0-7A6B-4417-8E5C-322B08633AAC}.Debug|Win32.Build.0 = Debug|Win32 - {276C3DB0-7A6B-4417-8E5C-322B08633AAC}.Debug|x64.ActiveCfg = Debug|Win32 - {276C3DB0-7A6B-4417-8E5C-322B08633AAC}.RD|Win32.ActiveCfg = RD|Win32 - {276C3DB0-7A6B-4417-8E5C-322B08633AAC}.RD|Win32.Build.0 = RD|Win32 - {276C3DB0-7A6B-4417-8E5C-322B08633AAC}.RD|x64.ActiveCfg = RD|Win32 - {D15B34EC-A32C-4968-9B0B-66998B579364}.Debug|Win32.ActiveCfg = Debug|Win32 - {D15B34EC-A32C-4968-9B0B-66998B579364}.Debug|Win32.Build.0 = Debug|Win32 - {D15B34EC-A32C-4968-9B0B-66998B579364}.Debug|x64.ActiveCfg = Debug|Win32 - {D15B34EC-A32C-4968-9B0B-66998B579364}.RD|Win32.ActiveCfg = RD|Win32 - {D15B34EC-A32C-4968-9B0B-66998B579364}.RD|Win32.Build.0 = RD|Win32 - {D15B34EC-A32C-4968-9B0B-66998B579364}.RD|x64.ActiveCfg = RD|Win32 - {C0300513-E845-43B4-9A4F-E8817EAEF57C}.Debug|Win32.ActiveCfg = Debug|Win32 - {C0300513-E845-43B4-9A4F-E8817EAEF57C}.Debug|Win32.Build.0 = Debug|Win32 - {C0300513-E845-43B4-9A4F-E8817EAEF57C}.Debug|x64.ActiveCfg = Debug|x64 - {C0300513-E845-43B4-9A4F-E8817EAEF57C}.Debug|x64.Build.0 = Debug|x64 - {C0300513-E845-43B4-9A4F-E8817EAEF57C}.RD|Win32.ActiveCfg = RD|Win32 - {C0300513-E845-43B4-9A4F-E8817EAEF57C}.RD|Win32.Build.0 = RD|Win32 - {C0300513-E845-43B4-9A4F-E8817EAEF57C}.RD|x64.ActiveCfg = RD|x64 - {C0300513-E845-43B4-9A4F-E8817EAEF57C}.RD|x64.Build.0 = RD|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/VCMI_VS11.sln b/VCMI_VS11.sln index 5e54dddeb..900159c44 100644 --- a/VCMI_VS11.sln +++ b/VCMI_VS11.sln @@ -30,11 +30,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BattleAI", "AI\BattleAI\Bat {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} = {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor", "editor\Editor.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}" - ProjectSection(ProjectDependencies) = postProject - {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} = {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EmptyAI", "AI\EmptyAI\EmptyAI.vcxproj", "{C41C4EB6-6F74-4F37-9FB0-9FA6BF377837}" ProjectSection(ProjectDependencies) = postProject {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} = {B952FFC5-3039-4DE1-9F08-90ACDA483D8F} @@ -121,10 +116,6 @@ Global {C0300513-E845-43B4-9A4F-E8817EAEF57C}.RD|Win32.Build.0 = RD|Win32 {C0300513-E845-43B4-9A4F-E8817EAEF57C}.RD|x64.ActiveCfg = RD|x64 {C0300513-E845-43B4-9A4F-E8817EAEF57C}.RD|x64.Build.0 = RD|x64 - {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|Win32.ActiveCfg = Release|Win32 - {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.ActiveCfg = Debug|Win32 - {B12702AD-ABFB-343A-A199-8E24837244A3}.RD|Win32.ActiveCfg = Release|Win32 - {B12702AD-ABFB-343A-A199-8E24837244A3}.RD|x64.ActiveCfg = Release|Win32 {C41C4EB6-6F74-4F37-9FB0-9FA6BF377837}.Debug|Win32.ActiveCfg = RD|Win32 {C41C4EB6-6F74-4F37-9FB0-9FA6BF377837}.Debug|Win32.Build.0 = RD|Win32 {C41C4EB6-6F74-4F37-9FB0-9FA6BF377837}.Debug|x64.ActiveCfg = Debug|x64 diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt deleted file mode 100644 index 0b46494ca..000000000 --- a/editor/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -project(vcmieditor) -cmake_minimum_required(VERSION 2.8.7) - -include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR}) -include_directories(${Qt5Widgets_INCLUDE_DIRS}) - - -set(maped_SRCS - StdInc.cpp - Editor.cpp - Main.cpp -) - -set(maped_MOC_HEADERS - Editor.h -) - -set(maped_FORMS - editor.ui -) - -# Tell CMake to run moc when necessary: -set(CMAKE_AUTOMOC ON) - -# As moc files are generated in the binary dir, tell CMake -# to always look for includes there: -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5. -add_definitions(${Qt5Widgets_DEFINITIONS}) - -# Executables fail to build with Qt 5 in the default configuration -# without -fPIE. We add that here. -set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} ${CMAKE_CXX_FLAGS}") - -qt5_wrap_ui(maped_FORMS_OUT ${maped_FORMS}) - -add_executable(vcmieditor ${maped_SRCS} ${maped_FORMS_OUT}) - -# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore -target_link_libraries(vcmieditor vcmi ${Qt5Widgets_LIBRARIES}) - -set_target_properties(vcmieditor PROPERTIES ${PCH_PROPERTIES}) -cotire(vcmieditor) - -if (NOT APPLE) # Already inside bundle - install(TARGETS vcmieditor DESTINATION ${BIN_DIR}) -endif() - diff --git a/editor/ConfigWindows.cpp b/editor/ConfigWindows.cpp deleted file mode 100644 index fef03f3ff..000000000 --- a/editor/ConfigWindows.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "StdInc.h" -#include "ConfigWindows.h" -#include "Editor.h" -#include "../lib/mapping/CMap.h" - -#include - -MapSpecifications::MapSpecifications( QWidget *p /*= 0*/ ) : QDialog(p), editor(dynamic_cast(p)) -{ - QTabWidget * tabs = new QTabWidget(this); - - enum {GENERAL, PLAYER_SPEC, TEAMS, RUMORS, TIMED_EVENTS, LOSS_COND, VIC_COND, HEROES, ARTIFACTS, SPELLS, SEC_SKILLS}; - QWidget * tabWidgets[11]; - tabWidgets[GENERAL] = new QWidget(tabs); - - int tabNames[] = {160, 167, 169, 168, 170, 166, 171, 165}; - - tabs->addTab(tabWidgets[GENERAL], tr("General")); - -} diff --git a/editor/ConfigWindows.h b/editor/ConfigWindows.h deleted file mode 100644 index 3d2eed251..000000000 --- a/editor/ConfigWindows.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once -#include - -class Editor; - - -class MapSpecifications: public QDialog -{ - Q_OBJECT -public: - explicit MapSpecifications(QWidget *p = 0); - -private: - Editor * editor; - QLineEdit *lineEdit; -}; - - - - - - - diff --git a/editor/Editor.cpp b/editor/Editor.cpp deleted file mode 100644 index 158662630..000000000 --- a/editor/Editor.cpp +++ /dev/null @@ -1,136 +0,0 @@ -#include "StdInc.h" -#include "Editor.h" -#include "../lib/VCMI_Lib.h" -#include "../lib/VCMIDirs.h" -#include "../lib/filesystem/Filesystem.h" -#include "../lib/CGeneralTextHandler.h" -#include "../lib/mapping/CMap.h" -#include "../lib/mapping/CMapService.h" -#include "../lib/logging/CBasicLogConfigurator.h" - -Editor::Editor(QWidget *parent) - : QMainWindow(parent) -{ - // Setup default logging(enough for now) - console = new CConsoleHandler; - CBasicLogConfigurator logConfig(VCMIDirs::get().userCachePath() / "VCMI_Editor_log.txt", console); - logConfig.configureDefault(); - - preinitDLL(console); - loadDLLClasses(); - - VLC->generaltexth->readToVector("DATA/EDITOR", txtEditor); - VLC->generaltexth->readToVector("DATA/EDITRCMD", txtEditorCmd); - - ui.setupUi(this); - - createMenus(); -} - -Editor::~Editor() -{ - -} - -void Editor::createMenus() -{ - std::map > actions; //connect these to actions - enum MenuName {FILE=0, EDIT, VIEW, TOOLS, PLAYER, HELP, //main level - TERRAIN=0, RIVER, ROADS, ERASE, OBSTACLES, OBJECTS}; //tools submenus - - - //txts are in wrong order - std::swap(txtEditor[793], txtEditor[797]); - std::swap(txtEditor[794], txtEditor[797]); - std::swap(txtEditor[795], txtEditor[797]); - std::swap(txtEditor[796], txtEditor[797]); - - //setting up actions - - actions["file|1"] = [&]() - { - QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), - "", - tr("Files (*.h3m)")); - - std::ifstream is; - is.open (fileName.toStdString().c_str(), std::ios::binary ); - - // get length of file - is.seekg (0, std::ios::end); - int length = is.tellg(); - is.seekg (0, std::ios::beg); - - char* buffer = new char [length]; - is.read (buffer, length); - is.close(); - - map = CMapService::loadMap((ui8*)buffer, length); - }; - - //setting up menus - - QMenu * menus[6]; - for(int i=0; i<6; ++i) - menus[i] = menuBar()->addMenu(tr(txtEditor[751+i].c_str())); - - auto addMenu = [&](QMenu ** menuList, int txtBegin, int count, std::string actionBase, MenuName mn, const std::vector & separators) - { - for(int i=0; iaddSeparator(); - QAction * qa = new QAction(tr(txtEditor[txtBegin+i].c_str()), menus[mn]); - std::string actionName = actionBase + "|" + boost::lexical_cast(i); - if(vstd::contains(actions, actionName)) - { - QObject::connect(qa, &QAction::triggered, actions[actionName]); - } - menuList[mn]->addAction(qa); - } - }; - - //terrain submenus - QMenu* toolMenus[6]; - for(int i=0; i<6; ++i) - toolMenus[i] = menus[TOOLS]->addMenu(tr(txtEditor[789+i].c_str())); - - using namespace boost::assign; - std::vector seps; - seps += 4; - - addMenu(menus, 758, 6, "file", FILE, seps); - - seps.clear(); seps += 2, 6, 8; - addMenu(menus, 860, 10, "edit", EDIT, seps); - - seps.clear(); seps += 2, 3, 7; - addMenu(menus, 778, 10, "view", VIEW, seps); - - seps.clear(); seps += 0, 2; - addMenu(menus, 795, 3, "tools", TOOLS, seps); - - seps.clear(); - addMenu(menus, 846, 9, "player", PLAYER, seps); - - seps.clear(); seps += 1; - addMenu(menus, 856, 2, "help", HELP, seps); - - seps.clear(); seps += 4; - addMenu(toolMenus, 799, 14, "tools|terrain", TERRAIN, seps); - - seps.clear();; - addMenu(toolMenus, 814, 5, "tools|rivers", RIVER, seps); - - seps.clear(); - addMenu(toolMenus, 820, 4, "tools|roads", ROADS, seps); - - seps.clear(); - addMenu(toolMenus, 825, 4, "tools|erase", ERASE, seps); - - seps.clear(); seps += 16; - addMenu(toolMenus, 872, 17, "tools|obstacles", OBSTACLES, seps); - - seps.clear(); - addMenu(toolMenus, 830, 15, "tools|objects", OBJECTS, seps); -} diff --git a/editor/Editor.h b/editor/Editor.h deleted file mode 100644 index b4d68fa50..000000000 --- a/editor/Editor.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef EDITOR_H -#define EDITOR_H - -#include -#include -#include "ui_editor.h" - -class CConsoleHandler; -class CMap; - -class Editor : public QMainWindow -{ - Q_OBJECT - -public: - Editor(QWidget *parent = 0); - ~Editor(); - void createMenus(); - - std::unique_ptr map; -private: - - std::vector txtEditor, txtEditorCmd; - - CConsoleHandler * console; - - Ui::EditorClass ui; -}; - -#endif // EDITOR_H diff --git a/editor/Editor.vcxproj b/editor/Editor.vcxproj deleted file mode 100644 index 2c2476a86..000000000 --- a/editor/Editor.vcxproj +++ /dev/null @@ -1,178 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {B12702AD-ABFB-343A-A199-8E24837244A3} - Qt4VSv1.0 - - - - Application - v140 - - - Application - v140 - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.51106.1 - - - $(SolutionDir) - - - $(SolutionDir)$(Platform)\$(Configuration)\ - - - - UNICODE;WIN32;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions) - .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories) - Disabled - ProgramDatabase - MultiThreadedDebugDLL - false - Use - stdafx.h - $(IntDir)$(TargetName).pch - -Zm200 %(AdditionalOptions) - - - Windows - $(SolutionDir)\$(ProjectName).exe - $(QTDIR)\lib;%(AdditionalLibraryDirectories) - true - VCMI_lib.lib;qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;%(AdditionalDependencies) - - - - - UNICODE;WIN32;QT_DLL;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions) - .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories) - - MultiThreadedDLL - false - Use - StdInc.h - $(IntDir)$(TargetName).pch - - - Windows - $(OutDir)\$(ProjectName).exe - $(QTDIR)\lib;%(AdditionalLibraryDirectories) - false - qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies) - - - - - StdInc.h - - - StdInc.h - - - true - StdInc.h - - - true - - - - - - - - - true - - - true - - - StdInc.h - - - Create - Create - StdInc.h - - - - - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing ConfigWindows.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fStdInc.h" "-f../../ConfigWindows.h" - $(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing ConfigWindows.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../ConfigWindows.h" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" - - - - $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing Editor.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../Editor.h" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" - $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) - Moc%27ing Editor.h... - .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../Editor.h" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" - - - - - - $(QTDIR)\bin\uic.exe;%(AdditionalInputs) - Uic%27ing %(Identity)... - .\GeneratedFiles\ui_%(Filename).h;%(Outputs) - "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" - $(QTDIR)\bin\uic.exe;%(AdditionalInputs) - Uic%27ing %(Identity)... - .\GeneratedFiles\ui_%(Filename).h;%(Outputs) - "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" - - - - - %(FullPath);%(AdditionalInputs) - Rcc%27ing %(Identity)... - .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) - "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp - %(FullPath);%(AdditionalInputs) - Rcc%27ing %(Identity)... - .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) - "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp - - - - - - - - - - - \ No newline at end of file diff --git a/editor/Main.cpp b/editor/Main.cpp deleted file mode 100644 index 3bd176f13..000000000 --- a/editor/Main.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "StdInc.h" -#include "Editor.h" -#include - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - Editor w; - w.show(); - return a.exec(); -} diff --git a/editor/StdInc.cpp b/editor/StdInc.cpp deleted file mode 100644 index b64b59be5..000000000 --- a/editor/StdInc.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "StdInc.h" diff --git a/editor/StdInc.h b/editor/StdInc.h deleted file mode 100644 index 9e83a24d8..000000000 --- a/editor/StdInc.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "../Global.h" -#include diff --git a/editor/editor.qrc b/editor/editor.qrc deleted file mode 100644 index 0c399a5b2..000000000 --- a/editor/editor.qrc +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/editor/editor.ui b/editor/editor.ui deleted file mode 100644 index 3cf11c399..000000000 --- a/editor/editor.ui +++ /dev/null @@ -1,29 +0,0 @@ - - EditorClass - - - EditorClass - - - - 0 - 0 - 600 - 400 - - - - Editor - - - - - - - - - - - - -