Ver Fonte

- Compile fix for editor - Renamed /Editor to /editor and Scripting/ERM to scripting/erm - Removed unused ipch folder and format file - Removed ancient lua folder

beegee1 há 12 anos atrás
pai
commit
b1428bcd24

+ 3 - 3
CMakeLists.txt

@@ -105,7 +105,7 @@ else()
 endif()
 
 set (AI_LIB_DIR "${LIB_DIR}/AI")
-set (SCRIPTING_LIB_DIR "${LIB_DIR}/Scripting")
+set (SCRIPTING_LIB_DIR "${LIB_DIR}/scripting")
 
 #define required constants
 add_definitions(-DM_DATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_DIR}")
@@ -120,10 +120,10 @@ add_subdirectory(client)
 add_subdirectory(server)
 add_subdirectory(AI)
 if (NOT DISABLE_ERM)
-	add_subdirectory(Scripting/ERM)
+	add_subdirectory(scripting/erm)
 endif()
 if (ENABLE_EDITOR)
-	add_subdirectory(Editor)
+	add_subdirectory(editor)
 endif()
 
 #######################################

+ 1 - 1
VCMI_VS10.sln

@@ -12,7 +12,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StupidAI", "AI\StupidAI\Stu
 		{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}"
+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

+ 2 - 2
VCMI_VS11.sln

@@ -12,7 +12,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StupidAI", "AI\StupidAI\Stu
 		{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}"
+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
@@ -30,7 +30,7 @@ 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}"
+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

+ 1 - 1
client/Client.cpp

@@ -420,7 +420,7 @@ void CClient::newGame( CConnection *con, StartInfo *si )
 	hotSeat = (humanPlayers > 1);
 
 // 	std::vector<FileInfo> scriptModules;
-// 	CFileUtility::getFilesWithExt(scriptModules, LIB_DIR "/Scripting", "." LIB_EXT);
+// 	CFileUtility::getFilesWithExt(scriptModules, LIB_DIR "/scripting", "." LIB_EXT);
 // 	BOOST_FOREACH(FileInfo &m, scriptModules)
 // 	{
 // 		CScriptingModule * nm = CDynLibHandler::getNewScriptingModule(m.name);

+ 0 - 0
Editor/CMakeLists.txt → editor/CMakeLists.txt


+ 0 - 0
Editor/ConfigWindows.cpp → editor/ConfigWindows.cpp


+ 0 - 0
Editor/ConfigWindows.h → editor/ConfigWindows.h


+ 0 - 0
Editor/Editor.cpp → editor/Editor.cpp


+ 2 - 2
Editor/Editor.h → editor/Editor.h

@@ -1,6 +1,7 @@
 #ifndef EDITOR_H
 #define EDITOR_H
 
+#include <memory>
 #include <QtWidgets/QMainWindow>
 #include "ui_editor.h"
 
@@ -16,8 +17,7 @@ public:
 	~Editor();
 	void createMenus();
 
-
-	std::unique_ptr<CMap> map;
+    std::unique_ptr<CMap> map;
 private:
 
 	std::vector<std::string> txtEditor, txtEditorCmd;

+ 0 - 0
Editor/Editor.vcxproj → editor/Editor.vcxproj


+ 0 - 0
Editor/Main.cpp → editor/Main.cpp


+ 0 - 0
Editor/StdInc.cpp → editor/StdInc.cpp


+ 0 - 0
Editor/StdInc.h → editor/StdInc.h


+ 0 - 0
Editor/editor.qrc → editor/editor.qrc


+ 0 - 0
Editor/editor.ui → editor/editor.ui


+ 0 - 1
format

@@ -1 +0,0 @@
-5

+ 4 - 2
lib/logging/CBasicLogConfigurator.cpp

@@ -3,7 +3,8 @@
 
 #include "../CConfigHandler.h"
 
-CBasicLogConfigurator::CBasicLogConfigurator(const std::string & filePath, CConsoleHandler * console) : filePath(filePath), console(console), appendToLogFile(false)
+CBasicLogConfigurator::CBasicLogConfigurator(const std::string & filePath, CConsoleHandler * console) : filePath(filePath),
+    console(console), appendToLogFile(false)
 {
 
 }
@@ -79,7 +80,8 @@ void CBasicLogConfigurator::configure()
     }
     catch(const std::exception & e)
     {
-        logGlobal->errorStream() << "Could not initialize the logging system due to configuration error/s. The logging system can be in a corrupted state. " << e.what();
+        logGlobal->errorStream() << "Could not initialize the logging system due to configuration error/s."
+            << "The logging system can be in a corrupted state. " << e.what();
     }
 
     logGlobal->infoStream() << "Initialized logging system based on settings successfully.";

+ 0 - 3
lib/logging/CLogger.cpp

@@ -370,9 +370,6 @@ EConsoleTextColor::EConsoleTextColor CColorMapping::getColorFor(const CLoggerDom
 
 CLogConsoleTarget::CLogConsoleTarget(CConsoleHandler * console) : console(console), threshold(ELogLevel::INFO), coloredOutputEnabled(true)
 {
-    // more verbose version:
-	//formatter.setPattern("%l %n [%t] - %m");
-
 	formatter.setPattern("%m");
 }
 

+ 11 - 7
lib/logging/CLogger.h

@@ -126,12 +126,15 @@ extern DLL_LINKAGE CLogger * logBonus;
 extern DLL_LINKAGE CLogger * logNetwork;
 extern DLL_LINKAGE CLogger * logAi;
 
-/// Macros for tracing the control flow of the application conveniently. If the TRACE_BEGIN macro is used it should be the first statement in the function, whereas
-/// the TRACE_END should be last one before a return statement. Logging traces via this macro have almost no impact when the trace is disabled.
+/// Macros for tracing the control flow of the application conveniently. If the TRACE_BEGIN macro is used it should be
+/// the first statement in the function, whereas the TRACE_END should be last one before a return statement.
+/// Logging traces via this macro have almost no impact when the trace is disabled.
 #define TRACE_BEGIN(logger) logger->traceStream() << boost::format("Entering %s.") % BOOST_CURRENT_FUNCTION;
-#define TRACE_BEGIN_PARAMS(logger, formatStr, params) if(logger->isTraceEnabled()) logger->traceStream() << boost::format("Entering %s: " + std::string(formatStr) + ".") % BOOST_CURRENT_FUNCTION % params;
+#define TRACE_BEGIN_PARAMS(logger, formatStr, params) if(logger->isTraceEnabled()) logger->traceStream() << \
+    boost::format("Entering %s: " + std::string(formatStr) + ".") % BOOST_CURRENT_FUNCTION % params;
 #define TRACE_END(logger) logger->traceStream() << boost::format("Leaving %s.") % BOOST_CURRENT_FUNCTION;
-#define TRACE_END_PARAMS(logger, formatStr, params) if(logger->isTraceEnabled()) logger->traceStream() << boost::format("Leaving %s: " + std::string(formatStr) + ".") % BOOST_CURRENT_FUNCTION % params;
+#define TRACE_END_PARAMS(logger, formatStr, params) if(logger->isTraceEnabled()) logger->traceStream() << \
+    boost::format("Leaving %s: " + std::string(formatStr) + ".") % BOOST_CURRENT_FUNCTION % params;
 
 /* ---------------------------------------------------------------------------- */
 /* Implementation/Detail classes, Private API */
@@ -159,7 +162,8 @@ private:
 struct DLL_LINKAGE LogRecord
 {
     LogRecord(const CLoggerDomain & domain, ELogLevel::ELogLevel level, const std::string & message)
-        : domain(domain), level(level), message(message), timeStamp(boost::posix_time::second_clock::local_time()), threadId(boost::this_thread::get_id())
+        : domain(domain), level(level), message(message), timeStamp(boost::posix_time::second_clock::local_time()),
+          threadId(boost::this_thread::get_id())
     {
 
     }
@@ -249,8 +253,8 @@ private:
 class DLL_LINKAGE CLogFileTarget : public ILogTarget
 {
 public:
-    /// Constructs a CLogFileTarget and opens the file designated by filePath. If the append parameter is true, the file will be appended to. Otherwise the file designated by filePath
-    /// will be truncated before being opened.
+    /// Constructs a CLogFileTarget and opens the file designated by filePath. If the append parameter is true, the file
+    /// will be appended to. Otherwise the file designated by filePath will be truncated before being opened.
     explicit CLogFileTarget(const std::string & filePath, bool append = true);
     ~CLogFileTarget();
 

+ 0 - 0
Scripting/ERM/CMakeLists.txt → scripting/erm/CMakeLists.txt


+ 0 - 0
Scripting/ERM/ERM.cbp → scripting/erm/ERM.cbp


+ 5 - 5
Scripting/ERM/ERM.vcxproj → scripting/erm/ERM.vcxproj

@@ -74,16 +74,16 @@
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <OutDir>$(VCMI_Out)\Scripting\</OutDir>
+	<OutDir>$(VCMI_Out)\scripting\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <OutDir>$(VCMI_Out)\Scripting\</OutDir>
+	<OutDir>$(VCMI_Out)\scripting\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RD|Win32'">
-    <OutDir>$(VCMI_Out)\Scripting\</OutDir>
+	<OutDir>$(VCMI_Out)\scripting\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RD|x64'">
-    <OutDir>$(VCMI_Out)\Scripting\</OutDir>
+	<OutDir>$(VCMI_Out)\scripting\</OutDir>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
@@ -141,4 +141,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>

+ 0 - 0
Scripting/ERM/ERMInterpreter.cpp → scripting/erm/ERMInterpreter.cpp


+ 0 - 0
Scripting/ERM/ERMInterpreter.h → scripting/erm/ERMInterpreter.h


+ 0 - 0
Scripting/ERM/ERMParser.cpp → scripting/erm/ERMParser.cpp


+ 0 - 0
Scripting/ERM/ERMParser.h → scripting/erm/ERMParser.h


+ 0 - 0
Scripting/ERM/ERMScriptModule.cpp → scripting/erm/ERMScriptModule.cpp


+ 0 - 0
Scripting/ERM/ERMScriptModule.h → scripting/erm/ERMScriptModule.h


+ 0 - 0
Scripting/ERM/StdInc.cpp → scripting/erm/StdInc.cpp


+ 0 - 0
Scripting/ERM/StdInc.h → scripting/erm/StdInc.h


+ 0 - 66
scripts/lua/objects/0023_marletto_tower.lua

@@ -1,66 +0,0 @@
--------------------------
---
--------------------------
-function find(t, searched)
-	print("searching")
-	for index,value in ipairs(t) 
-	do 
-		print(index.." "..value)
-		if value==searched
-		then
-			return index
-		end
-	end
-	return nil
-end
-
-function contain(t, searched)
-	print("searching")
-	for index,value in ipairs(t) 
-	do 
-		print(index.." "..value)
-		if value==searched
-		then
-			return true
-		end
-	end
-	return false
-end
-
-function push_back(t,value)
-	t[(#t)+1] = value
-end
-
-myObjects = {}
-name = ""
-visited = {}
---------------------------------------------------------------
-function newObject_23 (ob)
-	myObjects[ob] = {}
-	print("Dostaje info o nowym Marletto Tower spod adresu " .. ob)
-	print(vcmi.getPos(ob))
-	visited[true],visited[false] = vcmi.getGnrlText(352), vcmi.getGnrlText(353)
-end
-
-function hoverText_23(Object)
-	local Hero = vcmi.getSelectedHero()
-	local ret = name.." "
-	if Hero>-1
-	then
-		ret = ret..visited[contain(myObjects[ObjectAddress],Hero)]
-	end
-	return name..visited[contain(myObjects[ObjectAddress],Hero)]
-	
-end
-
-function heroVisit_23(ObjectAddress, HeroID)
-	print("Hero with ID " .. HeroID .. " has visited object at " .. ObjectAddress)
-	if find(myObjects[ObjectAddress],HeroID)
-	then
-		print("Ten bohater juz tu byl")
-	else
-		print("Bierz obrone...")
-		vcmi.changePrimSkill(HeroID, 1, 1)
-		push_back(myObjects[ObjectAddress],HeroID)
-	end
-end