commit
190d34e2f7
@ -81,7 +81,6 @@ set(SQLITECPP_BUILD_TESTS OFF CACHE BOOL "Build and run tests."
|
|||||||
set(SQLITECPP_INTERNAL_SQLITE OFF CACHE BOOL "Add the internal SQLite3 source to the project." FORCE)
|
set(SQLITECPP_INTERNAL_SQLITE OFF CACHE BOOL "Add the internal SQLite3 source to the project." FORCE)
|
||||||
|
|
||||||
# Include all the libraries:
|
# Include all the libraries:
|
||||||
add_subdirectory(lib/inifile/)
|
|
||||||
add_subdirectory(lib/jsoncpp/)
|
add_subdirectory(lib/jsoncpp/)
|
||||||
add_subdirectory(lib/zlib/)
|
add_subdirectory(lib/zlib/)
|
||||||
add_subdirectory(lib/lua/)
|
add_subdirectory(lib/lua/)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include "src/Generating/BioGen.h"
|
#include "src/Generating/BioGen.h"
|
||||||
#include "src/StringCompression.h"
|
#include "src/StringCompression.h"
|
||||||
#include "src/WorldStorage/FastNBT.h"
|
#include "src/WorldStorage/FastNBT.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "src/IniFile.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include "src/Generating/BioGen.h"
|
#include "src/Generating/BioGen.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "src/IniFile.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QDirIterator>
|
#include <QDirIterator>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
#include "inifile/iniFile.h"
|
#include "src/IniFile.h"
|
||||||
#include "ChunkSource.h"
|
#include "ChunkSource.h"
|
||||||
#include "src/Generating/BioGen.h"
|
#include "src/Generating/BioGen.h"
|
||||||
#include "src/StringCompression.h"
|
#include "src/StringCompression.h"
|
||||||
|
@ -21,7 +21,7 @@ SOURCES +=\
|
|||||||
../../src/StringUtils.cpp \
|
../../src/StringUtils.cpp \
|
||||||
../../src/LoggerListeners.cpp \
|
../../src/LoggerListeners.cpp \
|
||||||
../../src/Logger.cpp \
|
../../src/Logger.cpp \
|
||||||
../../lib/inifile/iniFile.cpp \
|
../../src/IniFile.cpp \
|
||||||
../../src/OSSupport/File.cpp \
|
../../src/OSSupport/File.cpp \
|
||||||
../../src/OSSupport/CriticalSection.cpp \
|
../../src/OSSupport/CriticalSection.cpp \
|
||||||
../../src/OSSupport/IsThread.cpp \
|
../../src/OSSupport/IsThread.cpp \
|
||||||
@ -59,7 +59,7 @@ HEADERS += MainWindow.h \
|
|||||||
../../src/StringUtils.h \
|
../../src/StringUtils.h \
|
||||||
../../src/LoggerListeners.h \
|
../../src/LoggerListeners.h \
|
||||||
../../src/Logger.h \
|
../../src/Logger.h \
|
||||||
../../lib/inifile/iniFile.h \
|
../../src/IniFile.h \
|
||||||
../../src/OSSupport/File.h \
|
../../src/OSSupport/File.h \
|
||||||
../../src/OSSupport/CriticalSection.h \
|
../../src/OSSupport/CriticalSection.h \
|
||||||
../../src/OSSupport/IsThread.h \
|
../../src/OSSupport/IsThread.h \
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
cmake_minimum_required (VERSION 2.6)
|
|
||||||
project (iniFile)
|
|
||||||
|
|
||||||
include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
|
|
||||||
|
|
||||||
file(GLOB SOURCE
|
|
||||||
"*.h"
|
|
||||||
"*.cpp"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(iniFile ${SOURCE})
|
|
@ -15,7 +15,7 @@ $cfile "../Vector3.h"
|
|||||||
$cfile "../ChunkDef.h"
|
$cfile "../ChunkDef.h"
|
||||||
$cfile "../BiomeDef.h"
|
$cfile "../BiomeDef.h"
|
||||||
|
|
||||||
$cfile "../../lib/inifile/iniFile.h"
|
$cfile "../IniFile.h"
|
||||||
|
|
||||||
$cfile "../OSSupport/File.h"
|
$cfile "../OSSupport/File.h"
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "../Server.h"
|
#include "../Server.h"
|
||||||
#include "../CommandOutput.h"
|
#include "../CommandOutput.h"
|
||||||
|
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "../Entities/Player.h"
|
#include "../Entities/Player.h"
|
||||||
|
|
||||||
#define FIND_HOOK(a_HookName) HookMap::iterator Plugins = m_Hooks.find(a_HookName);
|
#define FIND_HOOK(a_HookName) HookMap::iterator Plugins = m_Hooks.find(a_HookName);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "BlockID.h"
|
#include "BlockID.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "IniFile.h"
|
||||||
#include "Item.h"
|
#include "Item.h"
|
||||||
#include "Mobs/Monster.h"
|
#include "Mobs/Monster.h"
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ SET (SRCS
|
|||||||
FastRandom.cpp
|
FastRandom.cpp
|
||||||
FurnaceRecipe.cpp
|
FurnaceRecipe.cpp
|
||||||
Globals.cpp
|
Globals.cpp
|
||||||
|
IniFile.cpp
|
||||||
Inventory.cpp
|
Inventory.cpp
|
||||||
Item.cpp
|
Item.cpp
|
||||||
ItemGrid.cpp
|
ItemGrid.cpp
|
||||||
@ -98,6 +99,7 @@ SET (HDRS
|
|||||||
ForEachChunkProvider.h
|
ForEachChunkProvider.h
|
||||||
FurnaceRecipe.h
|
FurnaceRecipe.h
|
||||||
Globals.h
|
Globals.h
|
||||||
|
IniFile.h
|
||||||
Inventory.h
|
Inventory.h
|
||||||
Item.h
|
Item.h
|
||||||
ItemGrid.h
|
ItemGrid.h
|
||||||
@ -320,4 +322,4 @@ endif ()
|
|||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)
|
target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(${EXECUTABLE} luaexpat iniFile jsoncpp polarssl zlib sqlite lua SQLiteCpp)
|
target_link_libraries(${EXECUTABLE} luaexpat jsoncpp polarssl zlib sqlite lua SQLiteCpp)
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "../WorldStorage/StatSerializer.h"
|
#include "../WorldStorage/StatSerializer.h"
|
||||||
#include "../CompositeChat.h"
|
#include "../CompositeChat.h"
|
||||||
|
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "json/json.h"
|
#include "json/json.h"
|
||||||
|
|
||||||
// 6000 ticks or 5 minutes
|
// 6000 ticks or 5 minutes
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "BioGen.h"
|
#include "BioGen.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "../LinearUpscale.h"
|
#include "../LinearUpscale.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,5 +65,5 @@ SET (HDRS
|
|||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
add_library(Generating ${SRCS} ${HDRS})
|
add_library(Generating ${SRCS} ${HDRS})
|
||||||
|
|
||||||
target_link_libraries(Generating OSSupport iniFile Blocks)
|
target_link_libraries(Generating OSSupport Blocks)
|
||||||
endif()
|
endif()
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
|
|
||||||
#include "ChunkGenerator.h"
|
#include "ChunkGenerator.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "ChunkDesc.h"
|
#include "ChunkDesc.h"
|
||||||
#include "ComposableGenerator.h"
|
#include "ComposableGenerator.h"
|
||||||
#include "Noise3DGenerator.h"
|
#include "Noise3DGenerator.h"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "../BlockID.h"
|
#include "../BlockID.h"
|
||||||
#include "../Item.h"
|
#include "../Item.h"
|
||||||
#include "../LinearUpscale.h"
|
#include "../LinearUpscale.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "ComposableGenerator.h"
|
#include "ComposableGenerator.h"
|
||||||
#include "../World.h"
|
#include "../World.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "../Root.h"
|
#include "../Root.h"
|
||||||
|
|
||||||
// Individual composed algorithms:
|
// Individual composed algorithms:
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "DistortedHeightmap.h"
|
#include "DistortedHeightmap.h"
|
||||||
#include "../OSSupport/File.h"
|
#include "../OSSupport/File.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "../LinearUpscale.h"
|
#include "../LinearUpscale.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "EndGen.h"
|
#include "EndGen.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "../LinearUpscale.h"
|
#include "../LinearUpscale.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "../Simulator/FluidSimulator.h" // for cFluidSimulator::CanWashAway()
|
#include "../Simulator/FluidSimulator.h" // for cFluidSimulator::CanWashAway()
|
||||||
#include "../Simulator/FireSimulator.h"
|
#include "../Simulator/FireSimulator.h"
|
||||||
#include "../World.h"
|
#include "../World.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "HeiGen.h"
|
#include "HeiGen.h"
|
||||||
#include "../LinearUpscale.h"
|
#include "../LinearUpscale.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "DistortedHeightmap.h"
|
#include "DistortedHeightmap.h"
|
||||||
#include "EndGen.h"
|
#include "EndGen.h"
|
||||||
#include "Noise3DGenerator.h"
|
#include "Noise3DGenerator.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "Noise3DGenerator.h"
|
#include "Noise3DGenerator.h"
|
||||||
#include "../OSSupport/File.h"
|
#include "../OSSupport/File.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "../LinearInterpolation.h"
|
#include "../LinearInterpolation.h"
|
||||||
#include "../LinearUpscale.h"
|
#include "../LinearUpscale.h"
|
||||||
|
|
||||||
|
@ -29,5 +29,5 @@ SET (HDRS
|
|||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
add_library(Generating_Prefabs ${SRCS} ${HDRS})
|
add_library(Generating_Prefabs ${SRCS} ${HDRS})
|
||||||
|
|
||||||
target_link_libraries(Generating_Prefabs OSSupport iniFile Blocks)
|
target_link_libraries(Generating_Prefabs OSSupport Blocks)
|
||||||
endif()
|
endif()
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "../OSSupport/ListenThread.h"
|
#include "../OSSupport/ListenThread.h"
|
||||||
#include "../OSSupport/SocketThreads.h"
|
#include "../OSSupport/SocketThreads.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "PolarSSL++/RsaPrivateKey.h"
|
#include "PolarSSL++/RsaPrivateKey.h"
|
||||||
#include "PolarSSL++/CryptoKey.h"
|
#include "PolarSSL++/CryptoKey.h"
|
||||||
#include "PolarSSL++/X509Cert.h"
|
#include "PolarSSL++/X509Cert.h"
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
// Local Includes
|
// Local Includes
|
||||||
#include "iniFile.h"
|
#include "IniFile.h"
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#define iniEOL endl
|
#define iniEOL endl
|
||||||
@ -32,10 +32,6 @@
|
|||||||
#define iniEOL '\r' << endl
|
#define iniEOL '\r' << endl
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#define sscanf_s(buffer, stringbuffer, ...) (sscanf(buffer, stringbuffer, __VA_ARGS__))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
@ -465,20 +461,6 @@ bool cIniFile::SetValueF(const AString & a_KeyName, const AString & a_ValueName,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool cIniFile::SetValueV(const AString & a_KeyName, const AString & a_ValueName, const char * a_Format, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
va_start(args, a_Format);
|
|
||||||
AString Data;
|
|
||||||
AppendVPrintf(Data, a_Format, args);
|
|
||||||
va_end(args);
|
|
||||||
return SetValue(a_KeyName, a_ValueName, Data);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AString cIniFile::GetValue(const int keyID, const int valueID, const AString & defValue) const
|
AString cIniFile::GetValue(const int keyID, const int valueID, const AString & defValue) const
|
||||||
{
|
{
|
||||||
if ((keyID < (int)keys.size()) && (valueID < (int)keys[keyID].names.size()))
|
if ((keyID < (int)keys.size()) && (valueID < (int)keys[keyID].names.size()))
|
@ -154,12 +154,6 @@ public:
|
|||||||
}
|
}
|
||||||
bool SetValueF(const AString & a_KeyName, const AString & a_ValueName, const double a_Value, const bool a_CreateIfNotExists = true);
|
bool SetValueF(const AString & a_KeyName, const AString & a_ValueName, const double a_Value, const bool a_CreateIfNotExists = true);
|
||||||
|
|
||||||
// tolua_end
|
|
||||||
|
|
||||||
bool SetValueV( const AString & a_KeyName, const AString & a_ValueName, const char * a_Format, ...);
|
|
||||||
|
|
||||||
// tolua_begin
|
|
||||||
|
|
||||||
// Deletes specified value.
|
// Deletes specified value.
|
||||||
// Returns true if value existed and deleted, false otherwise.
|
// Returns true if value existed and deleted, false otherwise.
|
||||||
bool DeleteValueByID(const int keyID, const int valueID);
|
bool DeleteValueByID(const int keyID, const int valueID);
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "MonsterConfig.h"
|
#include "MonsterConfig.h"
|
||||||
#include "Mobs/Monster.h"
|
#include "Mobs/Monster.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "IniFile.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "../Server.h"
|
#include "../Server.h"
|
||||||
#include "../ClientHandle.h"
|
#include "../ClientHandle.h"
|
||||||
|
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "json/json.h"
|
#include "json/json.h"
|
||||||
|
|
||||||
#include "PolarSSL++/BlockingSslClientSocket.h"
|
#include "PolarSSL++/BlockingSslClientSocket.h"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "MojangAPI.h"
|
#include "MojangAPI.h"
|
||||||
#include "SQLiteCpp/Database.h"
|
#include "SQLiteCpp/Database.h"
|
||||||
#include "SQLiteCpp/Statement.h"
|
#include "SQLiteCpp/Statement.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
#include "json/json.h"
|
#include "json/json.h"
|
||||||
#include "PolarSSL++/BlockingSslClientSocket.h"
|
#include "PolarSSL++/BlockingSslClientSocket.h"
|
||||||
#include "../RankManager.h"
|
#include "../RankManager.h"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// Implements the cRCONServer class representing the RCON server
|
// Implements the cRCONServer class representing the RCON server
|
||||||
|
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "IniFile.h"
|
||||||
#include "RCONServer.h"
|
#include "RCONServer.h"
|
||||||
#include "Server.h"
|
#include "Server.h"
|
||||||
#include "Root.h"
|
#include "Root.h"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "RankManager.h"
|
#include "RankManager.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "IniFile.h"
|
||||||
#include "Protocol/MojangAPI.h"
|
#include "Protocol/MojangAPI.h"
|
||||||
#include "ClientHandle.h"
|
#include "ClientHandle.h"
|
||||||
|
|
||||||
|
@ -19,11 +19,10 @@
|
|||||||
#include "OSSupport/Timer.h"
|
#include "OSSupport/Timer.h"
|
||||||
#include "LoggerListeners.h"
|
#include "LoggerListeners.h"
|
||||||
#include "BuildInfo.h"
|
#include "BuildInfo.h"
|
||||||
|
#include "IniFile.h"
|
||||||
#include "inifile/iniFile.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "conio.h"
|
#include <conio.h>
|
||||||
#include <psapi.h>
|
#include <psapi.h>
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "MersenneTwister.h"
|
#include "MersenneTwister.h"
|
||||||
|
|
||||||
#include "inifile/iniFile.h"
|
#include "IniFile.h"
|
||||||
#include "Vector3.h"
|
#include "Vector3.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "../Defines.h"
|
#include "../Defines.h"
|
||||||
#include "../Entities/FallingBlock.h"
|
#include "../Entities/FallingBlock.h"
|
||||||
#include "../Chunk.h"
|
#include "../Chunk.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "../IniFile.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "OSSupport/Socket.h"
|
#include "OSSupport/Socket.h"
|
||||||
#include "Bindings/LuaState.h"
|
#include "Bindings/LuaState.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "IniFile.h"
|
||||||
#include "HTTPServer/HTTPServer.h"
|
#include "HTTPServer/HTTPServer.h"
|
||||||
#include "HTTPServer/HTTPFormParser.h"
|
#include "HTTPServer/HTTPFormParser.h"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "Server.h"
|
#include "Server.h"
|
||||||
#include "Item.h"
|
#include "Item.h"
|
||||||
#include "Root.h"
|
#include "Root.h"
|
||||||
#include "inifile/iniFile.h"
|
#include "IniFile.h"
|
||||||
#include "ChunkMap.h"
|
#include "ChunkMap.h"
|
||||||
#include "Generating/ChunkDesc.h"
|
#include "Generating/ChunkDesc.h"
|
||||||
#include "OSSupport/Timer.h"
|
#include "OSSupport/Timer.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user