diff --git a/CMakeLists.txt b/CMakeLists.txt index 879b01f95..9acd2f2dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,25 +16,17 @@ IF(NOT DEFINED CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") ENDIF(NOT DEFINED CMAKE_BUILD_TYPE) -SET(SO_MAJOR_VERSION "0") -SET(SO_MINOR_VERSION "0") -SET(SO_BUILD_VERSION "1") -SET(SO_VERSION "${SO_MAJOR_VERSION}.${SO_MINOR_VERSION}.${SO_BUILD_VERSION}") - - SET( LIBRARY_OUTPUT_PATH ${dfhack_SOURCE_DIR}/output CACHE PATH "Output directory for the dfhack library" ) SET( EXECUTABLE_OUTPUT_PATH ${dfhack_SOURCE_DIR}/output CACHE PATH "Output directory for the dfhack tools" ) -SET( CMAKE_SWIG_OUTDIR ${dfhack_SOURCE_DIR}/output CACHE PATH "Global output directory for swig generated language wrappers" ) -include_directories (${CMAKE_SOURCE_DIR}/dfhack/include/) -include_directories (${CMAKE_SOURCE_DIR}/dfhack/shm/) -include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/md5/) -include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/tinyxml/) -include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/argstream/) +include_directories (${CMAKE_SOURCE_DIR}/library/include/) +include_directories (${CMAKE_SOURCE_DIR}/library/shm/) +include_directories (${CMAKE_SOURCE_DIR}/library/depends/md5/) +include_directories (${CMAKE_SOURCE_DIR}/library/depends/tinyxml/) +include_directories (${CMAKE_SOURCE_DIR}/library/depends/argstream/) -add_subdirectory (dfhack) +add_subdirectory (library) #add_subdirectory (dfhack/python) -add_subdirectory (dfhack/shm) add_subdirectory (tools/examples) add_subdirectory (tools/playground) add_subdirectory (tools/supported) diff --git a/README b/README index 5814e8716..56c5c4d7d 100644 --- a/README +++ b/README @@ -55,41 +55,40 @@ Contributing to DFHack Several things should be kept in mind when contributing to DFHack. -Keep the same coding style. DFhack uses ANSI formatting and four spaces as -indentation. Line endings are UNIX. Code not following this won't make -me happy, because I'll have to fix it. +**** Coding style **** + +DFhack uses ANSI formatting and four spaces as indentation. Line endings are +UNIX. The files use UTF-8 encoding. Code not following this won't make me happy, +because I'll have to fix it. There's a good chance I'll make *you* fix it ;) + +**** How to get new code into DFHack **** -* How to get new code into DFHack You can send patches or make a clone of the github repo and ask me on the IRC channel to pull your code in. I'll review it and see if there are any problems. I'll fix them if they are minor. Fixes are higher in priority. If you want to work on something, but don't know what, check out http://github.com/peterix/dfhack/issues -- this is also -the place for new ideas. - -* Layout for tools -dfhack/ The folder for core dfhack. The libraries are in there. -tools/ This is used for stable and supported tools. These get distributed - in binary releases and should be tested. -examples/ This folder has some examples that show how to use certain parts - of dfhack. -playground/ And finally, here should be placed any quick hacks and testing - tools. - -Don't put untested or experimental things in tools/. - -* Layout for core dfhack -dfhack/ -- the main library lives here -dfhack/include -- header files for the main library belong here -dfhack/modules -- source of the client modules goes here -dfhack/include/modules -- headers for client modules -dfhack/shm -- the server part along with its modules -dfhack/python -- folder for the pytthon bindings -dfhack/depends -- dependencies. an XML parser, an MD5 implementation - and terminal arguments parser. - -* Modules - what are they? +a good place to dump new ideas and/or bugs that need fixing. + +**** Layout for tools **** + +Tools live in the tools/ folder. There, they are split into three categories: + +distributed: these tools get distributed with binary releases and are installed + by doing 'make install' on linux. They are supposed to be stable + and supported. Experimental, useless, buggy or untested stuff + doesn't belong here. +examples : examples are tools that aren't very useful, but show how DF + and DFHack work. They should use only DFHack API functions. + No actual hacking or 'magic offsets' are allowed. +playground : This is a catch-all folder for tools that aren't ready to be + examples or be distributed in binary releases. All new tools + should start here. They can contain actual hacking, magic values + and other nasty business. + +**** Modules - what are they? **** + DFHack uses modules to partition sets of features into manageable chunks. A module can have both client and server side. @@ -110,30 +109,33 @@ server, it allows accelerating the reading of map blocks. Communication between modules happens by using shared memory. This is pretty fast, but needs quite a bit of care to not break. -* Dependencies +**** Dependencies **** -If you want to add dependencies, think twice about it. All dependencies -for core dfhack should be either public domain or require attribution -at most. -Dependencies for tools can be either that, or any Free Software licenses. +Internal : either part of the codebase or statically linked. +External : linked as dynamic loaded libraries (.dll, .so, etc.) -* Current internal dependencies +If you want to add dependencies, think twice about it. All internal dependencies +for core dfhack should be either public domain or require attribution at most. +Internal dependencies for tools can be either that, or any Free Software +licenses. -tinyxml: used by core dfhack to read offset definitions from Memory.xml -md5: an implementation of the MD5 hash algorithm. Used for identifying - DF binaries on Linux. -argstream: Allows reading terminal application arguments. GPL! +** Current internal dependencies ** -* Current external dependencies +tinyxml : used by core dfhack to read offset definitions from Memory.xml +md5 : an implementation of the MD5 hash algorithm. Used for identifying + DF binaries on Linux. +argstream: Allows reading terminal application arguments. GPL! -wide-character ncurses: used for the veinlook tool on Linux. -python 2.6: required for building and using the python bindings. +** Current external dependencies ** -* Build-time dependencies +wide-character ncurses : used for the veinlook tool on Linux. +python 2.6 : required for building and using the python bindings. +** Build-time dependencies ** cmake: you need cmake to generate the build system and some configuration headers + Tools ----- All the DFHack tools are terminal programs. This might seem strange to Windows @@ -162,6 +164,7 @@ be useful and are cross-platform just like the library itself. - Your tool here: Write one ;) + Memory offset definitions ------------------------- diff --git a/dfhack/include/DFHackAPI.h b/dfhack/include/DFHackAPI.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/dfhack/include/DFHackAPI_C.h b/dfhack/include/DFHackAPI_C.h deleted file mode 100644 index bf4395895..000000000 --- a/dfhack/include/DFHackAPI_C.h +++ /dev/null @@ -1,73 +0,0 @@ -/* -www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any -damages arising from the use of this software. - -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and -redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and -must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. -*/ - -#ifndef DFHACK_C_API -#define DFHACK_C_API - -#include "Export.h" -#include "integers.h" - -typedef void DFHackObject; - -#ifdef __cplusplus -extern "C" { -#endif - -DFHACK_EXPORT DFHackObject* API_Alloc(const char* path_to_xml); -DFHACK_EXPORT void API_Free(DFHackObject* api); - -DFHACK_EXPORT int API_Attach(DFHackObject* api); -DFHACK_EXPORT int API_Detach(DFHackObject* api); -DFHACK_EXPORT int API_isAttached(DFHackObject* api); - -DFHACK_EXPORT int API_Suspend(DFHackObject* api); -DFHACK_EXPORT int API_Resume(DFHackObject* api); -DFHACK_EXPORT int API_isSuspended(DFHackObject* api); -DFHACK_EXPORT int API_ForceResume(DFHackObject* api); -DFHACK_EXPORT int API_AsyncSuspend(DFHackObject* api); - -DFHACK_EXPORT DFHackObject* API_getMemoryInfo(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getProcess(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getWindow(DFHackObject* api); - -DFHACK_EXPORT DFHackObject* API_getCreatures(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getMaps(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getGui(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getPosition(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getMaterials(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getTranslation(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getVegetation(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getBuildings(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getConstructions(DFHackObject* api); -DFHACK_EXPORT DFHackObject* API_getItems(DFHackObject* api); - -//these are DANGEROUS...can crash/segfault DF, turn the seas to blood, call up the Antichrist, etc -DFHACK_EXPORT void API_ReadRaw(DFHackObject* api, const uint32_t offset, const uint32_t size, uint8_t* target); -DFHACK_EXPORT void API_WriteRaw(DFHackObject* api, const uint32_t offset, const uint32_t size, uint8_t* source); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dfhack/pydfhack.i b/dfhack/pydfhack.i deleted file mode 100644 index 86048dd32..000000000 --- a/dfhack/pydfhack.i +++ /dev/null @@ -1,219 +0,0 @@ -%module pydfhack -%include "std_string.i" -%include "std_vector.i" -%include "std_map.i" -%include "stdint.i" -%include "typemaps.i" - -/* This goes to the header of the wrapper code */ -%{ -#define LINUX_BUILD -#define SWIG_WRAPPER -#include "DFTypes.h" -#include "DFHackAPI.h" -using namespace std; -using namespace DFHack; -%} - -/* make swig not react to the macro */ -%define DFHACK_EXPORT - -/* Parse the header file to generate wrappers */ -%include "DFTypes.h" - -/* templates have to be instantiated for swig */ -%template(MatglossVector) std::vector; -%template(PlantMatglossVector) std::vector; -%template(VeinVector) std::vector ; -%template(IceVeinVector) std::vector ; - -/* -This causes swig to generate BS uncompilable code -%template(GeologyAssign) std::vector < std::vector >; -*/ - -/* -SWIG typemaps recipe -%apply double *OUTPUT { double *result }; // 'double *result' is to be treated as OUTPUT -%clear double *result; // Remove all typemaps for double *result - -INPUT -int *INPUT -short *INPUT -long *INPUT -unsigned int *INPUT -unsigned short *INPUT -unsigned long *INPUT -double *INPUT -float *INPUT - -OUTPUT -int *OUTPUT -short *OUTPUT -long *OUTPUT -unsigned int *OUTPUT -unsigned short *OUTPUT -unsigned long *OUTPUT -double *OUTPUT -float *OUTPUT - -INOUT -int *INOUT -short *INOUT -long *INOUT -unsigned int *INOUT -unsigned short *INOUT -unsigned long *INOUT -double *INOUT -float *INOUT -*/ - -namespace DFHack -{ - class memory_info; - class Process; - class API - { - - class Private; - - Private * const d; - public: - API(const std::string path_to_xml); - ~API(); - bool Attach(); - bool Detach(); - bool isAttached(); - - bool ReadPauseState(); - - bool ReadViewScreen(t_viewscreen &); - - uint32_t ReadMenuState(); - - bool Suspend(); - bool AsyncSuspend(); - bool Resume(); - bool ForceResume(); - bool isSuspended(); - bool ReadStoneMatgloss(std::vector & OUTPUT); - bool ReadWoodMatgloss (std::vector & OUTPUT); - bool ReadMetalMatgloss(std::vector & OUTPUT); - bool ReadPlantMatgloss(std::vector & OUTPUT); - /* - * SWIG reports that it can't wrap the second method here - */ - bool ReadPlantMatgloss (std::vector & OUTPUT); - bool ReadCreatureMatgloss(std::vector & OUTPUT); - - bool ReadGeology( std::vector < std::vector >& OUTPUT ); - - bool InitMap(); - bool DestroyMap(); - - %apply uint32_t& OUTPUT { uint32_t& x }; - %apply uint32_t& OUTPUT { uint32_t& y }; - %apply uint32_t& OUTPUT { uint32_t& z }; - void getSize(uint32_t& x, uint32_t& y, uint32_t& z); - - bool isValidBlock(uint32_t blockx, uint32_t blocky, uint32_t blockz); - uint32_t getBlockPtr (uint32_t blockx, uint32_t blocky, uint32_t blockz); - - bool ReadBlock40d(uint32_t blockx, uint32_t blocky, uint32_t blockz, mapblock40d * OUTPUT); - - bool ReadTileTypes(uint32_t blockx, uint32_t blocky, uint32_t blockz, tiletypes40d *OUTPUT); - bool WriteTileTypes(uint32_t blockx, uint32_t blocky, uint32_t blockz, tiletypes40d *INPUT); - - bool ReadDesignations(uint32_t blockx, uint32_t blocky, uint32_t blockz, designations40d *OUTPUT); - bool WriteDesignations (uint32_t blockx, uint32_t blocky, uint32_t blockz, designations40d *INPUT); - - bool ReadOccupancy(uint32_t blockx, uint32_t blocky, uint32_t blockz, occupancies40d *OUTPUT); - bool WriteOccupancy(uint32_t blockx, uint32_t blocky, uint32_t blockz, occupancies40d *INPUT); - - bool ReadDirtyBit(uint32_t blockx, uint32_t blocky, uint32_t blockz, bool &OUTPUT); - bool WriteDirtyBit(uint32_t blockx, uint32_t blocky, uint32_t blockz, bool dirtybit); - - bool ReadRegionOffsets(uint32_t blockx, uint32_t blocky, uint32_t blockz, biome_indices40d *OUTPUT); - - bool ReadVeins(uint32_t blockx, uint32_t blocky, uint32_t blockz, std::vector & veins, std::vector & ices); - - %apply uint32_t& OUTPUT { uint32_t & numObjs }; - - bool InitReadConstructions( uint32_t & numObjs ); - bool ReadConstruction(const int32_t index, t_construction & OUTPUT); - void FinishReadConstructions(); - - bool InitReadBuildings ( uint32_t & numObjs ); - bool ReadBuilding(const int32_t index, t_building & OUTPUT); - void FinishReadBuildings(); - - bool InitReadVegetation( uint32_t & numObjs ); - bool ReadVegetation(const int32_t index, t_tree_desc & OUTPUT); - void FinishReadVegetation(); - - bool InitReadCreatures( uint32_t & numObjs ); - int32_t ReadCreatureInBox(int32_t index, t_creature & OUTPUT, - const uint16_t x1, const uint16_t y1,const uint16_t z1, - const uint16_t x2, const uint16_t y2,const uint16_t z2); - - bool ReadCreature(const int32_t index, t_creature & OUTPUT); - void FinishReadCreatures(); - - /* - A conundrum really. - */ - void ReadRaw (const uint32_t offset, const uint32_t size, uint8_t *target); - void WriteRaw (const uint32_t offset, const uint32_t size, uint8_t *source); - - bool InitViewAndCursor(); - - bool InitReadNotes( uint32_t & numnotes ); - bool ReadNote(const int32_t index, t_note & OUTPUT); - void FinishReadNotes(); - - bool InitReadSettlements( uint32_t & numObjs ); - bool ReadSettlement(const int32_t index, t_settlement & OUTPUT); - bool ReadCurrentSettlement(t_settlement & settlement); - void FinishReadSettlements(); - - bool InitReadHotkeys( ); - bool ReadHotkeys(t_hotkey hotkeys[]); - - %apply int32_t& OUTPUT { int32_t& x }; - %apply int32_t& OUTPUT { int32_t& y }; - %apply int32_t& OUTPUT { int32_t& z }; - bool getViewCoords (int32_t &x, int32_t &y, int32_t &z); - bool setViewCoords (const int32_t x, const int32_t y, const int32_t z); - - bool getCursorCoords (int32_t &x, int32_t &y, int32_t &z); - bool setCursorCoords (const int32_t x, const int32_t y, const int32_t z); - - bool getCurrentCursorCreature(uint32_t &OUTPUT); - - bool InitViewSize(); - - %apply int32_t& OUTPUT { int32_t& width }; - %apply int32_t& OUTPUT { int32_t& height }; - bool getWindowSize(int32_t & width, int32_t & height); - bool getItemIndexesInBox(std::vector &indexes, - const uint16_t x1, const uint16_t y1, const uint16_t z1, - const uint16_t x2, const uint16_t y2, const uint16_t z2); - bool InitReadNameTables (std::vector< std::vector > & translations , std::vector< std::vector > & foreign_languages); - void FinishReadNameTables(); - - std::string TranslateName(const t_name & name,const std::vector< std::vector > & translations ,const std::vector< std::vector > & foreign_languages, bool inEnglish=true); - - void WriteLabors(const uint32_t index, uint8_t labors[NUM_CREATURE_LABORS]); - - bool InitReadItems(uint32_t & numitems); - bool ReadItem(const uint32_t index, t_item & OUTPUT); - void FinishReadItems(); - - memory_info *getMemoryInfo(); - Process * getProcess(); - DFWindow * getWindow(); - bool ReadItemTypes(std::vector< std::vector< t_itemType > > & itemTypes); - }; -}; - -%enddef DFHACK_EXPORT \ No newline at end of file diff --git a/dfhack/APIPrivate.cpp b/library/APIPrivate.cpp similarity index 94% rename from dfhack/APIPrivate.cpp rename to library/APIPrivate.cpp index 0296a585e..f7c6ff221 100644 --- a/dfhack/APIPrivate.cpp +++ b/library/APIPrivate.cpp @@ -1,11 +1,11 @@ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include #include #include #include #include "private/APIPrivate.h" -#include "DFMemInfo.h" -#include "DFProcess.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" #include "modules/Materials.h" #include "modules/Creatures.h" diff --git a/dfhack/CMakeLists.txt b/library/CMakeLists.txt similarity index 87% rename from dfhack/CMakeLists.txt rename to library/CMakeLists.txt index 366b80d6a..7c7460dac 100644 --- a/dfhack/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -1,21 +1,19 @@ # don't use this file directly. use the one in the root folder of the project SET(PROJECT_HDRS -include/DFCommonInternal.h -include/DFError.h -include/DFHackAPI.h -include/DFMemInfo.h -include/DFMemInfoManager.h -include/DFProcessEnumerator.h -include/DFProcess.h -include/DFTileTypes.h -include/DFTypes.h -include/DFVector.h -include/DFWindow.h -#include/DFHackAPI_C.h -include/DFTypes_C.h -include/DFContext_C.h -include/integers.h +include/dfhack/DFCommonInternal.h +include/dfhack/DFError.h +include/dfhack/DFMemInfo.h +include/dfhack/DFMemInfoManager.h +include/dfhack/DFProcessEnumerator.h +include/dfhack/DFProcess.h +include/dfhack/DFTileTypes.h +include/dfhack/DFTypes.h +include/dfhack/DFVector.h +include/dfhack/DFWindow.h +include/dfhack-c/DFTypes_C.h +include/dfhack-c/DFContext_C.h +include/dfhack/DFIntegers.h shm/shms.h ) @@ -27,7 +25,6 @@ DFContext.cpp APIPrivate.cpp DFTileTypes.cpp DFVector.cpp -#DFHackAPI_C.cpp DFContext_C.cpp DFTypes_C.cpp @@ -109,7 +106,7 @@ ELSE( CMAKE_SIZEOF_VOID_P MATCHES 4 ) SET( HAVE_64_BIT 1 ) ENDIF( CMAKE_SIZEOF_VOID_P MATCHES 4 ) -CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/dfhack/config.h.cmake ${CMAKE_SOURCE_DIR}/dfhack/include/config.h ) +CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/library/config.h.cmake ${CMAKE_SOURCE_DIR}/library/include/config.h ) ADD_DEFINITIONS(-DBUILD_DFHACK_LIB) diff --git a/dfhack/DFContext.cpp b/library/DFContext.cpp similarity index 98% rename from dfhack/DFContext.cpp rename to library/DFContext.cpp index 9013c5659..84a08f230 100644 --- a/dfhack/DFContext.cpp +++ b/library/DFContext.cpp @@ -22,13 +22,13 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" -#include "DFProcess.h" -#include "DFProcessEnumerator.h" -#include "DFContext.h" -#include "DFContext.h" -#include "DFError.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFProcessEnumerator.h" +#include "dfhack/DFContext.h" +#include "dfhack/DFContext.h" +#include "dfhack/DFError.h" #include #include diff --git a/dfhack/DFContextManager.cpp b/library/DFContextManager.cpp similarity index 92% rename from dfhack/DFContextManager.cpp rename to library/DFContextManager.cpp index c66331e23..30494fd7d 100644 --- a/dfhack/DFContextManager.cpp +++ b/library/DFContextManager.cpp @@ -22,15 +22,15 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" -#include "DFProcess.h" -#include "DFProcessEnumerator.h" -#include "DFMemInfoManager.h" -#include "DFError.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFProcessEnumerator.h" +#include "dfhack/DFMemInfoManager.h" +#include "dfhack/DFError.h" -#include "DFContext.h" -#include "DFContextManager.h" +#include "dfhack/DFContext.h" +#include "dfhack/DFContextManager.h" #include #include diff --git a/dfhack/DFContext_C.cpp b/library/DFContext_C.cpp similarity index 96% rename from dfhack/DFContext_C.cpp rename to library/DFContext_C.cpp index 855bda6f6..2e9212194 100644 --- a/dfhack/DFContext_C.cpp +++ b/library/DFContext_C.cpp @@ -22,22 +22,22 @@ must not be misrepresented as being the original software. distribution. */ -#include "Tranquility.h" -#include "Export.h" +#include "dfhack/DFPragma.h" +#include "dfhack/DFExport.h" #include #include #include -#include "integers.h" -#include "DFTileTypes.h" -#include "DFTypes.h" -#include "DFWindow.h" -#include "DFContextManager.h" -#include "DFContext.h" +#include "dfhack/DFIntegers.h" +#include "dfhack/DFTileTypes.h" +#include "dfhack/DFTypes.h" +#include "dfhack/DFWindow.h" +#include "dfhack/DFContextManager.h" +#include "dfhack/DFContext.h" using namespace std; using namespace DFHack; -#include "DFContext_C.h" +#include "dfhack-c/DFContext_C.h" #ifdef __cplusplus extern "C" { diff --git a/dfhack/DFHackAPI.cpp b/library/DFHackAPI.cpp similarity index 100% rename from dfhack/DFHackAPI.cpp rename to library/DFHackAPI.cpp diff --git a/dfhack/DFHackAPI_C.cpp b/library/DFHackAPI_C.cpp similarity index 98% rename from dfhack/DFHackAPI_C.cpp rename to library/DFHackAPI_C.cpp index 7e9b62b61..bf025add8 100644 --- a/dfhack/DFHackAPI_C.cpp +++ b/library/DFHackAPI_C.cpp @@ -22,12 +22,12 @@ must not be misrepresented as being the original software. distribution. */ -#include "Tranquility.h" -#include "Export.h" +#include "DFPragma.h" +#include "DFExport.h" #include #include #include -#include "integers.h" +#include "DFIntegers.h" #include "DFTileTypes.h" #include "DFTypes.h" #include "DFWindow.h" diff --git a/dfhack/DFMemInfo.cpp b/library/DFMemInfo.cpp similarity index 99% rename from dfhack/DFMemInfo.cpp rename to library/DFMemInfo.cpp index 7247bce47..ca589116f 100644 --- a/dfhack/DFMemInfo.cpp +++ b/library/DFMemInfo.cpp @@ -22,10 +22,10 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" -#include "DFMemInfo.h" -#include "DFError.h" -#include "DFProcess.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFError.h" +#include "dfhack/DFProcess.h" using namespace DFHack; diff --git a/dfhack/DFMemInfoManager.cpp b/library/DFMemInfoManager.cpp similarity index 98% rename from dfhack/DFMemInfoManager.cpp rename to library/DFMemInfoManager.cpp index 3059eca66..d2e612821 100644 --- a/dfhack/DFMemInfoManager.cpp +++ b/library/DFMemInfoManager.cpp @@ -22,10 +22,10 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" -#include "DFMemInfo.h" -#include "DFMemInfoManager.h" -#include "DFError.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFMemInfoManager.h" +#include "dfhack/DFError.h" using namespace DFHack; diff --git a/dfhack/DFProcess-linux-SHM.cpp b/library/DFProcess-linux-SHM.cpp similarity index 99% rename from dfhack/DFProcess-linux-SHM.cpp rename to library/DFProcess-linux-SHM.cpp index 4b84d7086..b5e5b5cf0 100644 --- a/dfhack/DFProcess-linux-SHM.cpp +++ b/library/DFProcess-linux-SHM.cpp @@ -21,11 +21,11 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "DFCommonInternal.h" -#include "DFProcess.h" -#include "DFWindow.h" -#include "DFMemInfo.h" -#include "DFError.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFWindow.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFError.h" #include #include diff --git a/dfhack/DFProcess-linux-wine.cpp b/library/DFProcess-linux-wine.cpp similarity index 99% rename from dfhack/DFProcess-linux-wine.cpp rename to library/DFProcess-linux-wine.cpp index 18a1ca6fd..6c370ab00 100644 --- a/dfhack/DFProcess-linux-wine.cpp +++ b/library/DFProcess-linux-wine.cpp @@ -21,13 +21,12 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "DFCommonInternal.h" -#include "DFProcess.h" -#include "DFWindow.h" -#include "DFMemInfo.h" -#include "DFError.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFWindow.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFError.h" #include -#include #include #include using namespace DFHack; diff --git a/dfhack/DFProcess-linux.cpp b/library/DFProcess-linux.cpp similarity index 98% rename from dfhack/DFProcess-linux.cpp rename to library/DFProcess-linux.cpp index bff5f159a..5b0d14378 100644 --- a/dfhack/DFProcess-linux.cpp +++ b/library/DFProcess-linux.cpp @@ -21,11 +21,11 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "DFCommonInternal.h" -#include "DFProcess.h" -#include "DFWindow.h" -#include "DFMemInfo.h" -#include "DFError.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFWindow.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFError.h" #include #include using namespace DFHack; diff --git a/dfhack/DFProcess-windows-SHM.cpp b/library/DFProcess-windows-SHM.cpp similarity index 100% rename from dfhack/DFProcess-windows-SHM.cpp rename to library/DFProcess-windows-SHM.cpp diff --git a/dfhack/DFProcess-windows.cpp b/library/DFProcess-windows.cpp similarity index 100% rename from dfhack/DFProcess-windows.cpp rename to library/DFProcess-windows.cpp diff --git a/dfhack/DFProcessEnumerator-linux.cpp b/library/DFProcessEnumerator-linux.cpp similarity index 94% rename from dfhack/DFProcessEnumerator-linux.cpp rename to library/DFProcessEnumerator-linux.cpp index 1f1e26eeb..2094261cf 100644 --- a/dfhack/DFProcessEnumerator-linux.cpp +++ b/library/DFProcessEnumerator-linux.cpp @@ -22,11 +22,11 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" -#include "DFProcessEnumerator.h" -#include "DFProcess.h" -#include "DFMemInfo.h" -#include "DFMemInfoManager.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFProcessEnumerator.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFMemInfoManager.h" #include #include #include diff --git a/dfhack/DFProcessEnumerator-windows.cpp b/library/DFProcessEnumerator-windows.cpp similarity index 100% rename from dfhack/DFProcessEnumerator-windows.cpp rename to library/DFProcessEnumerator-windows.cpp diff --git a/dfhack/DFTileTypes.cpp b/library/DFTileTypes.cpp similarity index 93% rename from dfhack/DFTileTypes.cpp rename to library/DFTileTypes.cpp index 7ec2f781d..fc4b5ca87 100644 --- a/dfhack/DFTileTypes.cpp +++ b/library/DFTileTypes.cpp @@ -22,8 +22,8 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" -#include "DFTileTypes.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFTileTypes.h" using namespace DFHack; diff --git a/dfhack/DFTypes_C.cpp b/library/DFTypes_C.cpp similarity index 94% rename from dfhack/DFTypes_C.cpp rename to library/DFTypes_C.cpp index e969ba8ec..1ffa69008 100644 --- a/dfhack/DFTypes_C.cpp +++ b/library/DFTypes_C.cpp @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -22,7 +22,7 @@ must not be misrepresented as being the original software. distribution. */ -#include "integers.h" +#include "dfhack/DFIntegers.h" #include #include "string.h" #include @@ -30,9 +30,9 @@ distribution. using namespace std; -#include "DFCommonInternal.h" -#include "DFTypes.h" -#include "DFTypes_C.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFTypes.h" +#include "dfhack-c/DFTypes_C.h" #include "modules/Materials.h" using namespace DFHack; diff --git a/dfhack/DFVector.cpp b/library/DFVector.cpp similarity index 86% rename from dfhack/DFVector.cpp rename to library/DFVector.cpp index c1ff06910..474a2a219 100644 --- a/dfhack/DFVector.cpp +++ b/library/DFVector.cpp @@ -22,10 +22,10 @@ must not be misrepresented as being the original software. distribution. */ -#include "Tranquility.h" -#include "DFCommonInternal.h" -#include "DFMemInfo.h" -#include "DFProcess.h" -#include "DFVector.h" +#include "dfhack/DFPragma.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFVector.h" using namespace DFHack; diff --git a/dfhack/DFWindow-linux.cpp b/library/DFWindow-linux.cpp similarity index 99% rename from dfhack/DFWindow-linux.cpp rename to library/DFWindow-linux.cpp index bffe99de6..23a769724 100644 --- a/dfhack/DFWindow-linux.cpp +++ b/library/DFWindow-linux.cpp @@ -21,8 +21,8 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "DFCommonInternal.h" -#include "DFWindow.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFWindow.h" #include //need for X11 functions #include diff --git a/dfhack/DFWindow-windows.cpp b/library/DFWindow-windows.cpp similarity index 100% rename from dfhack/DFWindow-windows.cpp rename to library/DFWindow-windows.cpp diff --git a/dfhack/config.h.cmake b/library/config.h.cmake similarity index 100% rename from dfhack/config.h.cmake rename to library/config.h.cmake diff --git a/dfhack/depends/argstream/argstream.h b/library/depends/argstream/argstream.h similarity index 100% rename from dfhack/depends/argstream/argstream.h rename to library/depends/argstream/argstream.h diff --git a/dfhack/depends/md5/CMakeLists.txt b/library/depends/md5/CMakeLists.txt similarity index 100% rename from dfhack/depends/md5/CMakeLists.txt rename to library/depends/md5/CMakeLists.txt diff --git a/dfhack/depends/md5/md5.cpp b/library/depends/md5/md5.cpp similarity index 100% rename from dfhack/depends/md5/md5.cpp rename to library/depends/md5/md5.cpp diff --git a/dfhack/depends/md5/md5.h b/library/depends/md5/md5.h similarity index 98% rename from dfhack/depends/md5/md5.h rename to library/depends/md5/md5.h index 91b43b861..af2864a10 100644 --- a/dfhack/depends/md5/md5.h +++ b/library/depends/md5/md5.h @@ -45,7 +45,7 @@ //---------------------------------------------------------------------- //STL includes #include -#include +#include //---------------------------------------------------------------------- //typedefs typedef unsigned char *POINTER; diff --git a/dfhack/depends/md5/md5wrapper.cpp b/library/depends/md5/md5wrapper.cpp similarity index 100% rename from dfhack/depends/md5/md5wrapper.cpp rename to library/depends/md5/md5wrapper.cpp diff --git a/dfhack/depends/md5/md5wrapper.h b/library/depends/md5/md5wrapper.h similarity index 100% rename from dfhack/depends/md5/md5wrapper.h rename to library/depends/md5/md5wrapper.h diff --git a/dfhack/depends/tinyxml/CMakeLists.txt b/library/depends/tinyxml/CMakeLists.txt similarity index 100% rename from dfhack/depends/tinyxml/CMakeLists.txt rename to library/depends/tinyxml/CMakeLists.txt diff --git a/dfhack/depends/tinyxml/tinystr.cpp b/library/depends/tinyxml/tinystr.cpp similarity index 100% rename from dfhack/depends/tinyxml/tinystr.cpp rename to library/depends/tinyxml/tinystr.cpp diff --git a/dfhack/depends/tinyxml/tinystr.h b/library/depends/tinyxml/tinystr.h similarity index 100% rename from dfhack/depends/tinyxml/tinystr.h rename to library/depends/tinyxml/tinystr.h diff --git a/dfhack/depends/tinyxml/tinyxml.cpp b/library/depends/tinyxml/tinyxml.cpp similarity index 100% rename from dfhack/depends/tinyxml/tinyxml.cpp rename to library/depends/tinyxml/tinyxml.cpp diff --git a/dfhack/depends/tinyxml/tinyxml.h b/library/depends/tinyxml/tinyxml.h similarity index 100% rename from dfhack/depends/tinyxml/tinyxml.h rename to library/depends/tinyxml/tinyxml.h diff --git a/dfhack/depends/tinyxml/tinyxmlerror.cpp b/library/depends/tinyxml/tinyxmlerror.cpp similarity index 100% rename from dfhack/depends/tinyxml/tinyxmlerror.cpp rename to library/depends/tinyxml/tinyxmlerror.cpp diff --git a/dfhack/depends/tinyxml/tinyxmlparser.cpp b/library/depends/tinyxml/tinyxmlparser.cpp similarity index 100% rename from dfhack/depends/tinyxml/tinyxmlparser.cpp rename to library/depends/tinyxml/tinyxmlparser.cpp diff --git a/library/include/DFHack.h b/library/include/DFHack.h new file mode 100644 index 000000000..5dea35f19 --- /dev/null +++ b/library/include/DFHack.h @@ -0,0 +1,27 @@ +#ifndef DFHACK_API_H +#define DFHACK_API_H + +#include "dfhack/DFIntegers.h" +#include "dfhack/DFGlobal.h" +#include "dfhack/DFError.h" +#include "dfhack/DFTypes.h" +#include "dfhack/DFContextManager.h" +#include "dfhack/DFContext.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFTypes.h" + + +#include "modules/Buildings.h" +#include "modules/Materials.h" +#include "modules/Position.h" +#include "modules/Constructions.h" +#include "modules/Creatures.h" +#include "modules/Translation.h" +#include "modules/World.h" +#include "modules/Items.h" +#include "modules/Vegetation.h" +#include "modules/Maps.h" + +#include "dfhack/DFMiscUtils.h" +#endif \ No newline at end of file diff --git a/library/include/DFHack_C.h b/library/include/DFHack_C.h new file mode 100644 index 000000000..8eb381595 --- /dev/null +++ b/library/include/DFHack_C.h @@ -0,0 +1,43 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#ifndef DFHACK_C_API +#define DFHACK_C_API + +typedef void DFHackObject; + +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "dfhack-c/DFContext_C.h" +#include "dfhack-c/DFTypes_C.h" + +#ifdef __cplusplus +extern "C" { +#endif +// some global stuff here +#ifdef __cplusplus +} +#endif + +#endif diff --git a/dfhack/include/DFContext_C.h b/library/include/dfhack-c/DFContext_C.h similarity index 98% rename from dfhack/include/DFContext_C.h rename to library/include/dfhack-c/DFContext_C.h index d1aac9161..32ecca9e9 100644 --- a/dfhack/include/DFContext_C.h +++ b/library/include/dfhack-c/DFContext_C.h @@ -25,8 +25,8 @@ distribution. #ifndef DFHACK_C_CONTEXT #define DFHACK_C_CONTEXT -#include "Export.h" -#include "integers.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" typedef void DFHackObject; diff --git a/dfhack/include/DFTypes_C.h b/library/include/dfhack-c/DFTypes_C.h similarity index 95% rename from dfhack/include/DFTypes_C.h rename to library/include/dfhack-c/DFTypes_C.h index 6052555b0..8443f146e 100644 --- a/dfhack/include/DFTypes_C.h +++ b/library/include/dfhack-c/DFTypes_C.h @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -25,9 +25,9 @@ distribution. #ifndef TYPES_C_API #define TYPES_C_API -#include "Export.h" -#include "integers.h" -#include "DFTypes.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "dfhack/DFTypes.h" #include "modules/Materials.h" using namespace DFHack; diff --git a/dfhack/include/DFCommonInternal.h b/library/include/dfhack/DFCommonInternal.h similarity index 96% rename from dfhack/include/DFCommonInternal.h rename to library/include/dfhack/DFCommonInternal.h index 92a43c3b5..8cf157f48 100644 --- a/dfhack/include/DFCommonInternal.h +++ b/library/include/dfhack/DFCommonInternal.h @@ -25,7 +25,7 @@ distribution. #ifndef DFCOMMONINTERNAL_H_INCLUDED #define DFCOMMONINTERNAL_H_INCLUDED -// this makes everything that includes this file export symbols when using DFHACK_EXPORT (see Export.h) +// this makes everything that includes this file export symbols when using DFHACK_EXPORT (see DFExport.h) #ifndef BUILD_DFHACK_LIB #define BUILD_DFHACK_LIB #endif @@ -44,7 +44,7 @@ distribution. #include "DFGlobal.h" // one file for telling the MSVC compiler where it can shove its pointless warnings -#include "Tranquility.h" +#include "DFPragma.h" // basic stl containers and IO stuff #include @@ -55,7 +55,7 @@ distribution. using namespace std; // C99 integer types -#include "integers.h" +#include "DFIntegers.h" // C includes #include #include diff --git a/dfhack/include/DFContext.h b/library/include/dfhack/DFContext.h similarity index 99% rename from dfhack/include/DFContext.h rename to library/include/dfhack/DFContext.h index 734e9a9d0..09da5cb9c 100644 --- a/dfhack/include/DFContext.h +++ b/library/include/dfhack/DFContext.h @@ -26,7 +26,7 @@ distribution. #ifndef CONTEXT_H_INCLUDED #define CONTEXT_H_INCLUDED -#include "Export.h" +#include "DFExport.h" namespace DFHack { class Creatures; diff --git a/dfhack/include/DFContextManager.h b/library/include/dfhack/DFContextManager.h similarity index 95% rename from dfhack/include/DFContextManager.h rename to library/include/dfhack/DFContextManager.h index 09cc5d20d..ae152ddd6 100644 --- a/dfhack/include/DFContextManager.h +++ b/library/include/dfhack/DFContextManager.h @@ -25,12 +25,12 @@ distribution. #ifndef CONTEXTMANAGER_H_INCLUDED #define CONTEXTMANAGER_H_INCLUDED -#include "Tranquility.h" -#include "Export.h" +#include "DFPragma.h" +#include "DFExport.h" #include #include #include -#include "integers.h" +#include "DFIntegers.h" #include "DFTileTypes.h" #include "DFTypes.h" #include "DFWindow.h" diff --git a/dfhack/include/DFError.h b/library/include/dfhack/DFError.h similarity index 99% rename from dfhack/include/DFError.h rename to library/include/dfhack/DFError.h index 34cd69839..d838c5623 100644 --- a/dfhack/include/DFError.h +++ b/library/include/dfhack/DFError.h @@ -25,7 +25,7 @@ distribution. #ifndef ERROR_H_INCLUDED #define ERROR_H_INCLUDED -#include "Export.h" +#include "DFExport.h" #include #include #include diff --git a/dfhack/include/Export.h b/library/include/dfhack/DFExport.h similarity index 100% rename from dfhack/include/Export.h rename to library/include/dfhack/DFExport.h diff --git a/dfhack/include/DFGlobal.h b/library/include/dfhack/DFGlobal.h similarity index 87% rename from dfhack/include/DFGlobal.h rename to library/include/dfhack/DFGlobal.h index aea5833b8..3fdc35716 100644 --- a/dfhack/include/DFGlobal.h +++ b/library/include/dfhack/DFGlobal.h @@ -1,6 +1,6 @@ #ifndef DFHACK_GLOBAL #define DFHACK_GLOBAL -#include "Export.h" +#include "DFExport.h" // globals, if any, should be placed here. diff --git a/dfhack/include/integers.h b/library/include/dfhack/DFIntegers.h similarity index 100% rename from dfhack/include/integers.h rename to library/include/dfhack/DFIntegers.h diff --git a/dfhack/include/DFMemInfo.h b/library/include/dfhack/DFMemInfo.h similarity index 65% rename from dfhack/include/DFMemInfo.h rename to library/include/dfhack/DFMemInfo.h index 9066c116e..765483ecc 100644 --- a/dfhack/include/DFMemInfo.h +++ b/library/include/dfhack/DFMemInfo.h @@ -25,9 +25,8 @@ distribution. #ifndef MEMINFO_H_INCLUDED #define MEMINFO_H_INCLUDED -#include "Tranquility.h" - -#include "Export.h" +#include "DFPragma.h" +#include "DFExport.h" #include #include #include @@ -45,9 +44,9 @@ namespace DFHack */ struct t_type { - t_type(uint32_t assign, uint32_t type, string classname) + t_type(uint32_t assign, uint32_t type, std::string classname) :classname(classname),assign(assign),type(type){}; - string classname; + std::string classname; uint32_t assign; uint32_t type; }; @@ -80,7 +79,7 @@ namespace DFHack } subs.clear(); } - string classname; + std::string classname; uint32_t vtable; uint32_t assign;// index to typeclass array if multiclass. return value if not. uint32_t type_offset; // offset of type data for multiclass @@ -106,52 +105,52 @@ namespace DFHack void RebaseAddresses(const int32_t new_base); void RebaseAll(const int32_t new_base); uint32_t getBase () const; - void setBase (const string&); + void setBase (const std::string&); void setBase (const uint32_t); - int32_t getOffset (const string&); - uint32_t getAddress (const string&); - uint32_t getHexValue (const string&); + int32_t getOffset (const std::string&); + uint32_t getAddress (const std::string&); + uint32_t getHexValue (const std::string&); int32_t getOffset (const char *); uint32_t getAddress (const char *); uint32_t getHexValue (const char *); - string getString (const string&); - string getProfession(const uint32_t) const; - string getJob(const uint32_t) const; - string getSkill (const uint32_t) const; - string getTrait (const uint32_t, const uint32_t) const; - string getTraitName(const uint32_t) const; - string getLabor (const uint32_t); + std::string getString (const std::string&); + std::string getProfession(const uint32_t) const; + std::string getJob(const uint32_t) const; + std::string getSkill (const uint32_t) const; + std::string getTrait (const uint32_t, const uint32_t) const; + std::string getTraitName(const uint32_t) const; + std::string getLabor (const uint32_t); void setVersion(const char *); - void setVersion(const string&); - string getVersion(); + void setVersion(const std::string&); + std::string getVersion(); void setOS(const char *); - void setOS(const string&); + void setOS(const std::string&); void setOS(const OSType); OSType getOS() const; - void setOffset (const string &, const int32_t); - void setAddress (const string &, const uint32_t); - void setHexValue (const string &, const uint32_t); + void setOffset (const std::string &, const int32_t); + void setAddress (const std::string &, const uint32_t); + void setHexValue (const std::string &, const uint32_t); - void setOffset (const string &, const char *); - void setAddress (const string &, const char *); - void setHexValue (const string &, const char *); - void setString (const string &, const char *); + void setOffset (const std::string &, const char *); + void setAddress (const std::string &, const char *); + void setHexValue (const std::string &, const char *); + void setString (const std::string &, const char *); - void setOffset (const string &, const string &); - void setAddress (const string &, const string &); - void setHexValue (const string &, const string &); - void setString (const string &, const string &); + void setOffset (const std::string &, const std::string &); + void setAddress (const std::string &, const std::string &); + void setHexValue (const std::string &, const std::string &); + void setString (const std::string &, const std::string &); - void setProfession(const string &, const string &); - void setJob(const string &, const string &); - void setSkill(const string &, const string &); - void setTrait(const string &,const string &,const string &,const string &,const string &,const string &,const string &,const string &); - void setLabor(const string &, const string &); + void setProfession(const std::string &, const std::string &); + void setJob(const std::string &, const std::string &); + void setSkill(const std::string &, const std::string &); + void setTrait(const std::string &,const std::string &,const std::string &,const std::string &,const std::string &,const std::string &,const std::string &,const std::string &); + void setLabor(const std::string &, const std::string &); void RebaseVTable(const int32_t offset); void setParentProcess(Process * _p); @@ -169,23 +168,23 @@ namespace DFHack /* * Get a ClassID when you know the classname. can fail if the class is not in the cache */ - bool resolveClassnameToClassID (const string classname, int32_t & classID); + bool resolveClassnameToClassID (const std::string classname, int32_t & classID); /* * Get a vptr from a classname. Can fail if the type is not in the cache * limited to normal classes, variable-dependent types will resolve to the base class */ - bool resolveClassnameToVPtr ( const string classname, uint32_t & vptr ); + bool resolveClassnameToVPtr ( const std::string classname, uint32_t & vptr ); /* * Get a classname from a previous classID. Can fail if the type is not in the cache (you use bogus classID) */ - bool resolveClassIDToClassname (const int32_t classID, string & classname); + bool resolveClassIDToClassname (const int32_t classID, std::string & classname); /* * Get the internal classID->classname mapping (for speed). DO NOT MANIPULATE THE VECTOR! */ - const vector * getClassIDMapping(); + const vector * getClassIDMapping(); }; } #endif // MEMINFO_H_INCLUDED diff --git a/dfhack/include/DFMemInfoManager.h b/library/include/dfhack/DFMemInfoManager.h similarity index 98% rename from dfhack/include/DFMemInfoManager.h rename to library/include/dfhack/DFMemInfoManager.h index f35a7184f..99c34afe1 100644 --- a/dfhack/include/DFMemInfoManager.h +++ b/library/include/dfhack/DFMemInfoManager.h @@ -25,7 +25,7 @@ distribution. #ifndef MEMINFO_MANAGER_H_INCLUDED #define MEMINFO_MANAGER_H_INCLUDED -#include "Tranquility.h" +#include "DFPragma.h" namespace DFHack { diff --git a/dfhack/include/DFMiscUtils.h b/library/include/dfhack/DFMiscUtils.h similarity index 97% rename from dfhack/include/DFMiscUtils.h rename to library/include/dfhack/DFMiscUtils.h index 82407c749..14f192e6a 100644 --- a/dfhack/include/DFMiscUtils.h +++ b/library/include/dfhack/DFMiscUtils.h @@ -3,16 +3,16 @@ #include #include #include -#include +#include #include #include #include #include using namespace std; -#include -#include -#include +#include +#include +#include /* * This is a header full of ugly, volatile things. diff --git a/dfhack/include/Tranquility.h b/library/include/dfhack/DFPragma.h similarity index 100% rename from dfhack/include/Tranquility.h rename to library/include/dfhack/DFPragma.h diff --git a/dfhack/include/DFProcess.h b/library/include/dfhack/DFProcess.h similarity index 99% rename from dfhack/include/DFProcess.h rename to library/include/dfhack/DFProcess.h index 24df203fe..84468d71a 100644 --- a/dfhack/include/DFProcess.h +++ b/library/include/dfhack/DFProcess.h @@ -25,8 +25,8 @@ distribution. #ifndef PROCESS_H_INCLUDED #define PROCESS_H_INCLUDED -#include "Tranquility.h" -#include "Export.h" +#include "DFPragma.h" +#include "DFExport.h" #include namespace DFHack diff --git a/dfhack/include/DFProcessEnumerator.h b/library/include/dfhack/DFProcessEnumerator.h similarity index 97% rename from dfhack/include/DFProcessEnumerator.h rename to library/include/dfhack/DFProcessEnumerator.h index 517acf5ce..c40253c15 100644 --- a/dfhack/include/DFProcessEnumerator.h +++ b/library/include/dfhack/DFProcessEnumerator.h @@ -25,8 +25,8 @@ distribution. #ifndef PROCESSMANAGER_H_INCLUDED #define PROCESSMANAGER_H_INCLUDED -#include "Tranquility.h" -#include "Export.h" +#include "DFPragma.h" +#include "DFExport.h" class TiXmlElement; diff --git a/dfhack/include/DFTileTypes.h b/library/include/dfhack/DFTileTypes.h similarity index 99% rename from dfhack/include/DFTileTypes.h rename to library/include/dfhack/DFTileTypes.h index dc6912be4..920c1541f 100644 --- a/dfhack/include/DFTileTypes.h +++ b/library/include/dfhack/DFTileTypes.h @@ -25,7 +25,7 @@ distribution. #ifndef TILETYPES_H_INCLUDED #define TILETYPES_H_INCLUDED -#include "Tranquility.h" +#include "DFPragma.h" namespace DFHack { diff --git a/dfhack/include/DFTypes.h b/library/include/dfhack/DFTypes.h similarity index 99% rename from dfhack/include/DFTypes.h rename to library/include/dfhack/DFTypes.h index 458adb741..95ab11ccd 100644 --- a/dfhack/include/DFTypes.h +++ b/library/include/dfhack/DFTypes.h @@ -25,8 +25,8 @@ distribution. #ifndef TYPES_H_INCLUDED #define TYPES_H_INCLUDED -#include "Tranquility.h" -#include "Export.h" +#include "DFPragma.h" +#include "DFExport.h" namespace DFHack { diff --git a/dfhack/include/DFVector.h b/library/include/dfhack/DFVector.h similarity index 98% rename from dfhack/include/DFVector.h rename to library/include/dfhack/DFVector.h index 7d69330a8..c46c80492 100644 --- a/dfhack/include/DFVector.h +++ b/library/include/dfhack/DFVector.h @@ -25,8 +25,8 @@ distribution. #ifndef DFVECTOR_H_INCLUDED #define DFVECTOR_H_INCLUDED -#include "Tranquility.h" -#include "Export.h" +#include "DFPragma.h" +#include "DFExport.h" namespace DFHack { class Process; diff --git a/dfhack/include/DFWindow.h b/library/include/dfhack/DFWindow.h similarity index 97% rename from dfhack/include/DFWindow.h rename to library/include/dfhack/DFWindow.h index 99e5f37ba..d24f7297c 100644 --- a/dfhack/include/DFWindow.h +++ b/library/include/dfhack/DFWindow.h @@ -25,8 +25,8 @@ distribution. #ifndef KEYS_H_INCLUDED #define KEYS_H_INCLUDED -#include "Tranquility.h" -#include "Export.h" +#include "DFPragma.h" +#include "DFExport.h" namespace DFHack { diff --git a/dfhack/include/stdint_win.h b/library/include/dfhack/DFstdint_win.h similarity index 100% rename from dfhack/include/stdint_win.h rename to library/include/dfhack/DFstdint_win.h diff --git a/dfhack/include/modules/Buildings.h b/library/include/modules/Buildings.h similarity index 97% rename from dfhack/include/modules/Buildings.h rename to library/include/modules/Buildings.h index 55e739c16..ab25239f9 100644 --- a/dfhack/include/modules/Buildings.h +++ b/library/include/modules/Buildings.h @@ -3,7 +3,7 @@ /* * Buildings - also includes zones and stockpiles */ -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { struct t_building diff --git a/dfhack/include/modules/Buildings_C.h b/library/include/modules/Buildings_C.h similarity index 88% rename from dfhack/include/modules/Buildings_C.h rename to library/include/modules/Buildings_C.h index 5ecd7e4e7..d3c7a67b3 100644 --- a/dfhack/include/modules/Buildings_C.h +++ b/library/include/modules/Buildings_C.h @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -25,11 +25,11 @@ distribution. #ifndef BUILDINGS_C_API #define BUILDINGS_C_API -#include "Export.h" -#include "integers.h" -#include "DFTypes.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "dfhack/DFTypes.h" #include "modules/Buildings.h" -#include "DFHackAPI_C.h" +#include "DFHack_C.h" using namespace DFHack; diff --git a/dfhack/include/modules/Constructions.h b/library/include/modules/Constructions.h similarity index 97% rename from dfhack/include/modules/Constructions.h rename to library/include/modules/Constructions.h index a1d51eadc..f9fcd751e 100644 --- a/dfhack/include/modules/Constructions.h +++ b/library/include/modules/Constructions.h @@ -3,7 +3,7 @@ /* * DF constructions */ -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { // type of item the construction is made of diff --git a/dfhack/include/modules/Constructions_C.h b/library/include/modules/Constructions_C.h similarity index 86% rename from dfhack/include/modules/Constructions_C.h rename to library/include/modules/Constructions_C.h index 179ba8b3b..a859ec13d 100644 --- a/dfhack/include/modules/Constructions_C.h +++ b/library/include/modules/Constructions_C.h @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -25,11 +25,11 @@ distribution. #ifndef CONSTRUCTIONS_C_API #define CONSTRUCTIONS_C_API -#include "Export.h" -#include "integers.h" -#include "DFTypes.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "dfhack/DFTypes.h" #include "modules/Constructions.h" -#include "DFHackAPI_C.h" +#include "DFHack_C.h" using namespace DFHack; diff --git a/dfhack/include/modules/Creatures.h b/library/include/modules/Creatures.h similarity index 99% rename from dfhack/include/modules/Creatures.h rename to library/include/modules/Creatures.h index ac614be83..fad04f2fa 100644 --- a/dfhack/include/modules/Creatures.h +++ b/library/include/modules/Creatures.h @@ -3,7 +3,7 @@ /* * Creatures */ -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { /* diff --git a/dfhack/include/modules/Creatures_C.h b/library/include/modules/Creatures_C.h similarity index 90% rename from dfhack/include/modules/Creatures_C.h rename to library/include/modules/Creatures_C.h index e216c2a0f..81948f2db 100644 --- a/dfhack/include/modules/Creatures_C.h +++ b/library/include/modules/Creatures_C.h @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -25,12 +25,12 @@ distribution. #ifndef CREATURES_C_API #define CREATURES_C_API -#include "Export.h" -#include "integers.h" -#include "DFTypes.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "DFHack_C.h" +#include "dfhack/DFTypes.h" #include "modules/Materials.h" #include "modules/Creatures.h" -#include "DFHackAPI_C.h" using namespace DFHack; diff --git a/dfhack/include/modules/Gui.h b/library/include/modules/Gui.h similarity index 96% rename from dfhack/include/modules/Gui.h rename to library/include/modules/Gui.h index 55f2abb13..fdc921060 100644 --- a/dfhack/include/modules/Gui.h +++ b/library/include/modules/Gui.h @@ -4,7 +4,7 @@ /* * Gui: Query the DF's GUI state */ -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { diff --git a/dfhack/include/modules/Gui_C.h b/library/include/modules/Gui_C.h similarity index 87% rename from dfhack/include/modules/Gui_C.h rename to library/include/modules/Gui_C.h index cccde45fe..0bd68f3fc 100644 --- a/dfhack/include/modules/Gui_C.h +++ b/library/include/modules/Gui_C.h @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -25,10 +25,9 @@ distribution. #ifndef GUI_C_API #define GUI_C_API -#include "Export.h" -#include "integers.h" -#include "DFTypes.h" -#include "DFHackAPI_C.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "dfhack/DFTypes.h" using namespace DFHack; diff --git a/dfhack/include/modules/Items.h b/library/include/modules/Items.h similarity index 98% rename from dfhack/include/modules/Items.h rename to library/include/modules/Items.h index 44b4e3499..97fe736a9 100644 --- a/dfhack/include/modules/Items.h +++ b/library/include/modules/Items.h @@ -3,7 +3,7 @@ /* * Creatures */ -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { diff --git a/dfhack/include/modules/Items_C.h b/library/include/modules/Items_C.h similarity index 84% rename from dfhack/include/modules/Items_C.h rename to library/include/modules/Items_C.h index da84b19a5..23a1265b7 100644 --- a/dfhack/include/modules/Items_C.h +++ b/library/include/modules/Items_C.h @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -25,15 +25,15 @@ distribution. #ifndef ITEMS_C_API #define ITEMS_C_API -#include "Export.h" -#include "integers.h" -#include "DFCommonInternal.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "dfhack/DFCommonInternal.h" using namespace DFHack; -#include "DFTypes.h" +#include "dfhack/DFTypes.h" #include "modules/Items.h" -#include "DFHackAPI_C.h" +#include "DFHack_C.h" #ifdef __cplusplus extern "C" { diff --git a/dfhack/include/modules/Maps.h b/library/include/modules/Maps.h similarity index 99% rename from dfhack/include/modules/Maps.h rename to library/include/modules/Maps.h index 990b5ca83..2a10b1705 100644 --- a/dfhack/include/modules/Maps.h +++ b/library/include/modules/Maps.h @@ -5,7 +5,7 @@ #ifndef CL_MOD_MAPS #define CL_MOD_MAPS -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { /*************************************************************************** diff --git a/dfhack/include/modules/Maps_C.h b/library/include/modules/Maps_C.h similarity index 94% rename from dfhack/include/modules/Maps_C.h rename to library/include/modules/Maps_C.h index d966c04f8..be66a45b2 100644 --- a/dfhack/include/modules/Maps_C.h +++ b/library/include/modules/Maps_C.h @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -25,17 +25,17 @@ distribution. #ifndef MAPS_C_API #define MAPS_C_API -#include "Export.h" -#include "integers.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" #include #include #include using namespace std; -#include "DFTypes.h" +#include "dfhack/DFTypes.h" #include "modules/Maps.h" -#include "DFHackAPI_C.h" +#include "DFHack_C.h" using namespace DFHack; diff --git a/dfhack/include/modules/Materials.h b/library/include/modules/Materials.h similarity index 99% rename from dfhack/include/modules/Materials.h rename to library/include/modules/Materials.h index f3b9b928d..8e484568e 100644 --- a/dfhack/include/modules/Materials.h +++ b/library/include/modules/Materials.h @@ -3,7 +3,7 @@ /* * Creatures */ -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { class DFContextPrivate; diff --git a/dfhack/include/modules/Materials_C.h b/library/include/modules/Materials_C.h similarity index 92% rename from dfhack/include/modules/Materials_C.h rename to library/include/modules/Materials_C.h index 03ebbf532..0bac48f81 100644 --- a/dfhack/include/modules/Materials_C.h +++ b/library/include/modules/Materials_C.h @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -25,12 +25,12 @@ distribution. #ifndef MATERIALS_C_API #define MATERIALS_C_API -#include "Export.h" -#include "integers.h" -#include "DFTypes.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "dfhack/DFTypes.h" #include "modules/Materials.h" -#include "DFHackAPI_C.h" -#include "DFTypes_C.h" +#include "DFHack_C.h" +#include "dfhack-c/DFTypes_C.h" using namespace DFHack; diff --git a/dfhack/include/modules/Position.h b/library/include/modules/Position.h similarity index 97% rename from dfhack/include/modules/Position.h rename to library/include/modules/Position.h index d1f646893..6e55b82e6 100644 --- a/dfhack/include/modules/Position.h +++ b/library/include/modules/Position.h @@ -3,7 +3,7 @@ /* * View position and size and cursor position */ -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { #define NUM_HOTKEYS 16 diff --git a/dfhack/include/modules/Position_C.h b/library/include/modules/Position_C.h similarity index 96% rename from dfhack/include/modules/Position_C.h rename to library/include/modules/Position_C.h index fb74fc647..3b2f1dc0b 100644 --- a/dfhack/include/modules/Position_C.h +++ b/library/include/modules/Position_C.h @@ -25,9 +25,8 @@ distribution. #ifndef POSITION_C_API #define POSITION_C_API -#include "Export.h" - -#include "DFHackAPI_C.h" +#include "dfhack/DFExport.h" +#include "DFHack_C.h" #ifdef __cplusplus extern "C" { diff --git a/dfhack/include/modules/Translation.h b/library/include/modules/Translation.h similarity index 96% rename from dfhack/include/modules/Translation.h rename to library/include/modules/Translation.h index c9461daba..2b70d4df0 100644 --- a/dfhack/include/modules/Translation.h +++ b/library/include/modules/Translation.h @@ -3,7 +3,7 @@ /* * DF translation tables and name translation */ -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { class DFContextPrivate; diff --git a/dfhack/include/modules/Translation_C.h b/library/include/modules/Translation_C.h similarity index 87% rename from dfhack/include/modules/Translation_C.h rename to library/include/modules/Translation_C.h index 37bd37a45..067df25fa 100644 --- a/dfhack/include/modules/Translation_C.h +++ b/library/include/modules/Translation_C.h @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -25,11 +25,11 @@ distribution. #ifndef TRANSLATION_C_API #define TRANSLATION_C_API -#include "Export.h" -#include "integers.h" -#include "DFTypes.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "dfhack/DFTypes.h" #include "modules/Translation.h" -#include "DFHackAPI_C.h" +#include "DFHack_C.h" using namespace DFHack; diff --git a/dfhack/include/modules/Vegetation.h b/library/include/modules/Vegetation.h similarity index 97% rename from dfhack/include/modules/Vegetation.h rename to library/include/modules/Vegetation.h index 17b53093c..3f647b752 100644 --- a/dfhack/include/modules/Vegetation.h +++ b/library/include/modules/Vegetation.h @@ -3,7 +3,7 @@ /* * DF vegetation - stuff that grows and gets cut down or trampled by dwarves */ -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { /* diff --git a/dfhack/include/modules/Vegetation_C.h b/library/include/modules/Vegetation_C.h similarity index 86% rename from dfhack/include/modules/Vegetation_C.h rename to library/include/modules/Vegetation_C.h index 5db1300e2..8a3417016 100644 --- a/dfhack/include/modules/Vegetation_C.h +++ b/library/include/modules/Vegetation_C.h @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -25,11 +25,11 @@ distribution. #ifndef VEGETATION_C_API #define VEGETATION_C_API -#include "Export.h" -#include "integers.h" -#include "DFTypes.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "dfhack/DFTypes.h" #include "modules/Vegetation.h" -#include "DFHackAPI_C.h" +#include "DFHack_C.h" using namespace DFHack; diff --git a/dfhack/include/modules/World.h b/library/include/modules/World.h similarity index 95% rename from dfhack/include/modules/World.h rename to library/include/modules/World.h index 1f112cb3e..a7ab7f979 100644 --- a/dfhack/include/modules/World.h +++ b/library/include/modules/World.h @@ -4,7 +4,7 @@ /* * World: all kind of stuff related to the current world state */ -#include "Export.h" +#include "dfhack/DFExport.h" namespace DFHack { diff --git a/dfhack/modules/Buildings.cpp b/library/modules/Buildings.cpp similarity index 96% rename from dfhack/modules/Buildings.cpp rename to library/modules/Buildings.cpp index 5166de41f..93e72578b 100644 --- a/dfhack/modules/Buildings.cpp +++ b/library/modules/Buildings.cpp @@ -22,13 +22,13 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "../private/APIPrivate.h" #include "modules/Translation.h" -#include "DFMemInfo.h" -#include "DFProcess.h" -#include "DFVector.h" -#include "DFTypes.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFVector.h" +#include "dfhack/DFTypes.h" #include "modules/Buildings.h" using namespace DFHack; diff --git a/dfhack/modules/Buildings_C.cpp b/library/modules/Buildings_C.cpp similarity index 92% rename from dfhack/modules/Buildings_C.cpp rename to library/modules/Buildings_C.cpp index 1c6631e38..4136a7e3d 100644 --- a/dfhack/modules/Buildings_C.cpp +++ b/library/modules/Buildings_C.cpp @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -22,15 +22,15 @@ must not be misrepresented as being the original software. distribution. */ -#include "integers.h" +#include "dfhack/DFIntegers.h" #include #include #include "stdio.h" using namespace std; -#include "DFCommonInternal.h" -#include "DFTypes.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFTypes.h" #include "modules/Buildings.h" #include "modules/Buildings_C.h" diff --git a/dfhack/modules/Constructions.cpp b/library/modules/Constructions.cpp similarity index 94% rename from dfhack/modules/Constructions.cpp rename to library/modules/Constructions.cpp index c9790943b..b8f06583f 100644 --- a/dfhack/modules/Constructions.cpp +++ b/library/modules/Constructions.cpp @@ -22,13 +22,13 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "../private/APIPrivate.h" #include "modules/Translation.h" -#include "DFMemInfo.h" -#include "DFProcess.h" -#include "DFVector.h" -#include "DFTypes.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFVector.h" +#include "dfhack/DFTypes.h" #include "modules/Constructions.h" using namespace DFHack; diff --git a/dfhack/modules/Constructions_C.cpp b/library/modules/Constructions_C.cpp similarity index 89% rename from dfhack/modules/Constructions_C.cpp rename to library/modules/Constructions_C.cpp index 3b19b679e..4adec6844 100644 --- a/dfhack/modules/Constructions_C.cpp +++ b/library/modules/Constructions_C.cpp @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -22,10 +22,10 @@ must not be misrepresented as being the original software. distribution. */ -#include "integers.h" +#include "dfhack/DFIntegers.h" -#include "DFCommonInternal.h" -#include "DFTypes.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFTypes.h" #include "modules/Constructions.h" #include "modules/Constructions_C.h" diff --git a/dfhack/modules/Creatures.cpp b/library/modules/Creatures.cpp similarity index 98% rename from dfhack/modules/Creatures.cpp rename to library/modules/Creatures.cpp index 81bbef4c3..5e514d063 100644 --- a/dfhack/modules/Creatures.cpp +++ b/library/modules/Creatures.cpp @@ -22,14 +22,14 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "../private/APIPrivate.h" -#include "DFMemInfo.h" -#include "DFProcess.h" -#include "DFVector.h" -#include "DFError.h" -#include "DFTypes.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFVector.h" +#include "dfhack/DFError.h" +#include "dfhack/DFTypes.h" // we connect to those #include diff --git a/dfhack/modules/Creatures_C.cpp b/library/modules/Creatures_C.cpp similarity index 93% rename from dfhack/modules/Creatures_C.cpp rename to library/modules/Creatures_C.cpp index 9b0624da3..e26198906 100644 --- a/dfhack/modules/Creatures_C.cpp +++ b/library/modules/Creatures_C.cpp @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -22,19 +22,19 @@ must not be misrepresented as being the original software. distribution. */ -#include "Export.h" -#include "integers.h" +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" #include #include #include using namespace std; -#include "DFTypes.h" +#include "dfhack/DFTypes.h" #include "modules/Materials.h" #include "modules/Creatures.h" #include "modules/Creatures_C.h" -#include "DFHackAPI_C.h" +#include "DFHack_C.h" using namespace DFHack; diff --git a/dfhack/modules/Gui.cpp b/library/modules/Gui.cpp similarity index 95% rename from dfhack/modules/Gui.cpp rename to library/modules/Gui.cpp index 780b29ea9..434f28b6c 100644 --- a/dfhack/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -22,12 +22,12 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "../private/APIPrivate.h" #include "modules/Gui.h" -#include "DFProcess.h" -#include "DFMemInfo.h" -#include "DFTypes.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFTypes.h" using namespace DFHack; diff --git a/dfhack/modules/Gui_C.cpp b/library/modules/Gui_C.cpp similarity index 87% rename from dfhack/modules/Gui_C.cpp rename to library/modules/Gui_C.cpp index 8a8dc185d..347fb42e8 100644 --- a/dfhack/modules/Gui_C.cpp +++ b/library/modules/Gui_C.cpp @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -21,11 +21,13 @@ must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ - +#include +#include +#include "DFHack_C.h" #include "modules/Gui_C.h" -#include "integers.h" +#include "dfhack/DFIntegers.h" -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "modules/Gui.h" using namespace DFHack; diff --git a/dfhack/modules/Items.cpp b/library/modules/Items.cpp similarity index 97% rename from dfhack/modules/Items.cpp rename to library/modules/Items.cpp index a07d9da8b..1e494720c 100644 --- a/dfhack/modules/Items.cpp +++ b/library/modules/Items.cpp @@ -22,12 +22,12 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "../private/APIPrivate.h" -#include "DFTypes.h" -#include "DFMemInfo.h" -#include "DFProcess.h" -#include "DFVector.h" +#include "dfhack/DFTypes.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFVector.h" #include "modules/Materials.h" #include "modules/Items.h" diff --git a/dfhack/modules/Items_C.cpp b/library/modules/Items_C.cpp similarity index 88% rename from dfhack/modules/Items_C.cpp rename to library/modules/Items_C.cpp index ee652af13..a8dcdfe4a 100644 --- a/dfhack/modules/Items_C.cpp +++ b/library/modules/Items_C.cpp @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -22,19 +22,22 @@ must not be misrepresented as being the original software. distribution. */ -#include "Export.h" -#include "integers.h" #include #include -#include "DFTypes.h" +#include +#include "dfhack/DFExport.h" +#include "dfhack/DFIntegers.h" +#include "DFHack_C.h" + +#include "dfhack/DFTypes.h" using namespace std; using namespace DFHack; -#include "DFProcess.h" +#include "dfhack/DFProcess.h" #include "modules/Materials.h" #include "modules/Items.h" -#include "DFTypes_C.h" +#include "dfhack-c/DFTypes_C.h" #include "modules/Items_C.h" diff --git a/dfhack/modules/Maps.cpp b/library/modules/Maps.cpp similarity index 99% rename from dfhack/modules/Maps.cpp rename to library/modules/Maps.cpp index 757d1a095..156464afa 100644 --- a/dfhack/modules/Maps.cpp +++ b/library/modules/Maps.cpp @@ -22,16 +22,16 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include #include #include #include "../private/APIPrivate.h" #include "modules/Maps.h" -#include "DFError.h" -#include "DFMemInfo.h" -#include "DFProcess.h" -#include "DFVector.h" +#include "dfhack/DFError.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFVector.h" #define SHMMAPSHDR ((Server::Maps::shm_maps_hdr *)d->d->shm_start) #define SHMCMD(num) ((shm_cmd *)d->d->shm_start)[num]->pingpong diff --git a/dfhack/modules/Maps_C.cpp b/library/modules/Maps_C.cpp similarity index 97% rename from dfhack/modules/Maps_C.cpp rename to library/modules/Maps_C.cpp index d6a64daa4..1113c7ca1 100644 --- a/dfhack/modules/Maps_C.cpp +++ b/library/modules/Maps_C.cpp @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -22,15 +22,15 @@ must not be misrepresented as being the original software. distribution. */ -#include "integers.h" +#include "dfhack/DFIntegers.h" #include #include #include using namespace std; -#include "DFCommonInternal.h" -#include "DFTypes.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFTypes.h" #include "modules/Maps.h" #include "modules/Maps_C.h" diff --git a/dfhack/modules/Materials.cpp b/library/modules/Materials.cpp similarity index 98% rename from dfhack/modules/Materials.cpp rename to library/modules/Materials.cpp index cdd800a84..6b815b925 100644 --- a/dfhack/modules/Materials.cpp +++ b/library/modules/Materials.cpp @@ -22,13 +22,13 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "../private/APIPrivate.h" -#include "DFTypes.h" +#include "dfhack/DFTypes.h" #include "modules/Materials.h" -#include "DFMemInfo.h" -#include "DFProcess.h" -#include "DFVector.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFVector.h" using namespace DFHack; diff --git a/dfhack/modules/Materials_C.cpp b/library/modules/Materials_C.cpp similarity index 97% rename from dfhack/modules/Materials_C.cpp rename to library/modules/Materials_C.cpp index 12f2adc5e..206c300f8 100644 --- a/dfhack/modules/Materials_C.cpp +++ b/library/modules/Materials_C.cpp @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -22,17 +22,17 @@ must not be misrepresented as being the original software. distribution. */ -#include "integers.h" +#include "dfhack/DFIntegers.h" #include #include #include using namespace std; -#include "DFCommonInternal.h" -#include "DFTypes.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFTypes.h" #include "modules/Materials.h" -#include "DFTypes_C.h" +#include "dfhack-c/DFTypes_C.h" #include "modules/Materials_C.h" using namespace DFHack; diff --git a/dfhack/modules/Position.cpp b/library/modules/Position.cpp similarity index 97% rename from dfhack/modules/Position.cpp rename to library/modules/Position.cpp index 3690d36e9..3525e7a97 100644 --- a/dfhack/modules/Position.cpp +++ b/library/modules/Position.cpp @@ -22,11 +22,11 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "../private/APIPrivate.h" #include "modules/Position.h" -#include "DFMemInfo.h" -#include "DFProcess.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" using namespace DFHack; struct Position::Private diff --git a/dfhack/modules/Position_C.cpp b/library/modules/Position_C.cpp similarity index 96% rename from dfhack/modules/Position_C.cpp rename to library/modules/Position_C.cpp index 79b63e708..ff617ce23 100644 --- a/dfhack/modules/Position_C.cpp +++ b/library/modules/Position_C.cpp @@ -22,10 +22,12 @@ must not be misrepresented as being the original software. distribution. */ +#include +#include #include "modules/Position_C.h" -#include "integers.h" +#include "dfhack/DFIntegers.h" -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "modules/Position.h" using namespace DFHack; diff --git a/dfhack/modules/Translation.cpp b/library/modules/Translation.cpp similarity index 97% rename from dfhack/modules/Translation.cpp rename to library/modules/Translation.cpp index 767ba5403..ae2215223 100644 --- a/dfhack/modules/Translation.cpp +++ b/library/modules/Translation.cpp @@ -22,13 +22,13 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "../private/APIPrivate.h" #include "modules/Translation.h" -#include "DFMemInfo.h" -#include "DFProcess.h" -#include "DFVector.h" -#include "DFTypes.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFVector.h" +#include "dfhack/DFTypes.h" #include "modules/Translation.h" using namespace DFHack; diff --git a/dfhack/modules/Translation_C.cpp b/library/modules/Translation_C.cpp similarity index 92% rename from dfhack/modules/Translation_C.cpp rename to library/modules/Translation_C.cpp index 017fb092e..336db5b3c 100644 --- a/dfhack/modules/Translation_C.cpp +++ b/library/modules/Translation_C.cpp @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -22,13 +22,13 @@ must not be misrepresented as being the original software. distribution. */ -#include "integers.h" +#include "dfhack/DFIntegers.h" #include using namespace std; -#include "DFCommonInternal.h" -#include "DFTypes.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFTypes.h" #include "modules/Translation.h" #include "modules/Translation_C.h" diff --git a/dfhack/modules/Vegetation.cpp b/library/modules/Vegetation.cpp similarity index 94% rename from dfhack/modules/Vegetation.cpp rename to library/modules/Vegetation.cpp index a05351042..1a5909557 100644 --- a/dfhack/modules/Vegetation.cpp +++ b/library/modules/Vegetation.cpp @@ -22,13 +22,13 @@ must not be misrepresented as being the original software. distribution. */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "../private/APIPrivate.h" #include "modules/Translation.h" -#include "DFMemInfo.h" -#include "DFProcess.h" -#include "DFVector.h" -#include "DFTypes.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFVector.h" +#include "dfhack/DFTypes.h" #include "modules/Vegetation.h" using namespace DFHack; diff --git a/dfhack/modules/Vegetation_C.cpp b/library/modules/Vegetation_C.cpp similarity index 88% rename from dfhack/modules/Vegetation_C.cpp rename to library/modules/Vegetation_C.cpp index a3ced1ab8..8a809a42a 100644 --- a/dfhack/modules/Vegetation_C.cpp +++ b/library/modules/Vegetation_C.cpp @@ -1,6 +1,6 @@ /* www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf, doomchild This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any @@ -22,9 +22,9 @@ must not be misrepresented as being the original software. distribution. */ -#include "integers.h" -#include "DFCommonInternal.h" -#include "DFTypes.h" +#include "dfhack/DFIntegers.h" +#include "dfhack/DFCommonInternal.h" +#include "dfhack/DFTypes.h" #include "modules/Vegetation.h" #include "modules/Vegetation_C.h" diff --git a/dfhack/modules/World.cpp b/library/modules/World.cpp similarity index 95% rename from dfhack/modules/World.cpp rename to library/modules/World.cpp index 926ceec40..a281c5974 100644 --- a/dfhack/modules/World.cpp +++ b/library/modules/World.cpp @@ -34,12 +34,12 @@ FIXME: Japa said that he had to do this with the time stuff he got from here currentTickRel = (currentTick+9)-(((((currentMonth*28)+currentDay)*24)+currentHour)*50); */ -#include "DFCommonInternal.h" +#include "dfhack/DFCommonInternal.h" #include "../private/APIPrivate.h" #include "modules/World.h" -#include "DFProcess.h" -#include "DFMemInfo.h" -#include "DFTypes.h" +#include "dfhack/DFProcess.h" +#include "dfhack/DFMemInfo.h" +#include "dfhack/DFTypes.h" using namespace DFHack; diff --git a/dfhack/private/APIPrivate.h b/library/private/APIPrivate.h similarity index 100% rename from dfhack/private/APIPrivate.h rename to library/private/APIPrivate.h diff --git a/dfhack/python/CMakeLists.txt b/library/python/CMakeLists.txt similarity index 100% rename from dfhack/python/CMakeLists.txt rename to library/python/CMakeLists.txt diff --git a/dfhack/python/DF_API.cpp b/library/python/DF_API.cpp similarity index 99% rename from dfhack/python/DF_API.cpp rename to library/python/DF_API.cpp index 0901cd3dd..a65f8e065 100644 --- a/dfhack/python/DF_API.cpp +++ b/library/python/DF_API.cpp @@ -30,7 +30,7 @@ distribution. #include "integers.h" #include "DFTypes.h" -#include "DFHackAPI.h" +#include "DFContext.h" #include "DF_Imports.cpp" #include "DF_MemInfo.cpp" #include "DF_Position.cpp" @@ -68,7 +68,7 @@ struct DF_API PyObject* vegetation_type; PyObject* gui_type; - DFHack::ContextManager* api_Ptr; + DFHack::Context* api_Ptr; }; // API type Allocation, Deallocation, and Initialization @@ -110,7 +110,7 @@ static int DF_API_init(DF_API* self, PyObject* args, PyObject* kwds) return -1; if(memFileString) - self->api_Ptr = new DFHack::ContextManager(std::string(memFileString)); + self->api_Ptr = new DFHack::Context(std::string(memFileString)); else return -1; } diff --git a/dfhack/python/DF_Buildings.cpp b/library/python/DF_Buildings.cpp similarity index 99% rename from dfhack/python/DF_Buildings.cpp rename to library/python/DF_Buildings.cpp index 3bfaadd7a..2a1b9c51d 100644 --- a/dfhack/python/DF_Buildings.cpp +++ b/library/python/DF_Buildings.cpp @@ -28,7 +28,7 @@ distribution. #include "Python.h" #include #include -#include "integers.h" +#include "DFIntegers.h" using namespace std; diff --git a/dfhack/python/DF_Constructions.cpp b/library/python/DF_Constructions.cpp similarity index 100% rename from dfhack/python/DF_Constructions.cpp rename to library/python/DF_Constructions.cpp diff --git a/dfhack/python/DF_CreatureManager.cpp b/library/python/DF_CreatureManager.cpp similarity index 99% rename from dfhack/python/DF_CreatureManager.cpp rename to library/python/DF_CreatureManager.cpp index 6082b6263..b7071e804 100644 --- a/dfhack/python/DF_CreatureManager.cpp +++ b/library/python/DF_CreatureManager.cpp @@ -29,7 +29,7 @@ distribution. #include #include "stdio.h" #include -#include "integers.h" +#include "DFIntegers.h" #include "DFTypes.h" #include "modules/Materials.h" #include "modules/Creatures.h" diff --git a/dfhack/python/DF_CreatureType.cpp b/library/python/DF_CreatureType.cpp similarity index 100% rename from dfhack/python/DF_CreatureType.cpp rename to library/python/DF_CreatureType.cpp diff --git a/dfhack/python/DF_GUI.cpp b/library/python/DF_GUI.cpp similarity index 100% rename from dfhack/python/DF_GUI.cpp rename to library/python/DF_GUI.cpp diff --git a/dfhack/python/DF_Helpers.cpp b/library/python/DF_Helpers.cpp similarity index 100% rename from dfhack/python/DF_Helpers.cpp rename to library/python/DF_Helpers.cpp diff --git a/dfhack/python/DF_Imports.cpp b/library/python/DF_Imports.cpp similarity index 100% rename from dfhack/python/DF_Imports.cpp rename to library/python/DF_Imports.cpp diff --git a/dfhack/python/DF_Maps.cpp b/library/python/DF_Maps.cpp similarity index 100% rename from dfhack/python/DF_Maps.cpp rename to library/python/DF_Maps.cpp diff --git a/dfhack/python/DF_Material.cpp b/library/python/DF_Material.cpp similarity index 99% rename from dfhack/python/DF_Material.cpp rename to library/python/DF_Material.cpp index 97af851e2..75df503c6 100644 --- a/dfhack/python/DF_Material.cpp +++ b/library/python/DF_Material.cpp @@ -28,7 +28,7 @@ distribution. #include "Python.h" #include #include -#include "integers.h" +#include "DFIntegers.h" using namespace std; diff --git a/dfhack/python/DF_MemInfo.cpp b/library/python/DF_MemInfo.cpp similarity index 99% rename from dfhack/python/DF_MemInfo.cpp rename to library/python/DF_MemInfo.cpp index 16a830b41..b529af8da 100644 --- a/dfhack/python/DF_MemInfo.cpp +++ b/library/python/DF_MemInfo.cpp @@ -24,7 +24,7 @@ distribution. #ifndef __DF_MEMINFO__ #define __DF_MEMINFO__ -#include "Tranquility.h" +#include "DFPragma.h" #pragma GCC diagnostic ignored "-Wwrite-strings" #include "Python.h" @@ -32,8 +32,8 @@ distribution. using namespace std; -#include "Export.h" -#include "integers.h" +#include "DFExport.h" +#include "DFIntegers.h" #include "DFMemInfo.h" using namespace DFHack; diff --git a/dfhack/python/DF_Position.cpp b/library/python/DF_Position.cpp similarity index 100% rename from dfhack/python/DF_Position.cpp rename to library/python/DF_Position.cpp diff --git a/dfhack/python/DF_Translate.cpp b/library/python/DF_Translate.cpp similarity index 100% rename from dfhack/python/DF_Translate.cpp rename to library/python/DF_Translate.cpp diff --git a/dfhack/python/DF_Vegetation.cpp b/library/python/DF_Vegetation.cpp similarity index 99% rename from dfhack/python/DF_Vegetation.cpp rename to library/python/DF_Vegetation.cpp index ae8b6a016..748743a62 100644 --- a/dfhack/python/DF_Vegetation.cpp +++ b/library/python/DF_Vegetation.cpp @@ -26,7 +26,7 @@ distribution. #define __DFVEGETATION__ #include "Python.h" -#include "integers.h" +#include "DFIntegers.h" #include "modules/Vegetation.h" #include "DF_Helpers.cpp" diff --git a/dfhack/python/build-linux b/library/python/build-linux similarity index 100% rename from dfhack/python/build-linux rename to library/python/build-linux diff --git a/dfhack/python/build.bat b/library/python/build.bat similarity index 100% rename from dfhack/python/build.bat rename to library/python/build.bat diff --git a/dfhack/python/c api/buildings.py b/library/python/c api/buildings.py similarity index 100% rename from dfhack/python/c api/buildings.py rename to library/python/c api/buildings.py diff --git a/dfhack/python/c api/constructions.py b/library/python/c api/constructions.py similarity index 100% rename from dfhack/python/c api/constructions.py rename to library/python/c api/constructions.py diff --git a/dfhack/python/c api/context.py b/library/python/c api/context.py similarity index 100% rename from dfhack/python/c api/context.py rename to library/python/c api/context.py diff --git a/dfhack/python/c api/creatures.py b/library/python/c api/creatures.py similarity index 100% rename from dfhack/python/c api/creatures.py rename to library/python/c api/creatures.py diff --git a/dfhack/python/c api/dfhack_api_ctypes.py b/library/python/c api/dfhack_api_ctypes.py similarity index 100% rename from dfhack/python/c api/dfhack_api_ctypes.py rename to library/python/c api/dfhack_api_ctypes.py diff --git a/dfhack/python/c api/enum.py b/library/python/c api/enum.py similarity index 100% rename from dfhack/python/c api/enum.py rename to library/python/c api/enum.py diff --git a/dfhack/python/c api/gui.py b/library/python/c api/gui.py similarity index 100% rename from dfhack/python/c api/gui.py rename to library/python/c api/gui.py diff --git a/dfhack/python/c api/items.py b/library/python/c api/items.py similarity index 100% rename from dfhack/python/c api/items.py rename to library/python/c api/items.py diff --git a/dfhack/python/c api/maps.py b/library/python/c api/maps.py similarity index 100% rename from dfhack/python/c api/maps.py rename to library/python/c api/maps.py diff --git a/dfhack/python/c api/materials.py b/library/python/c api/materials.py similarity index 100% rename from dfhack/python/c api/materials.py rename to library/python/c api/materials.py diff --git a/dfhack/python/c api/position.py b/library/python/c api/position.py similarity index 100% rename from dfhack/python/c api/position.py rename to library/python/c api/position.py diff --git a/dfhack/python/c api/pydfhackflags.py b/library/python/c api/pydfhackflags.py similarity index 100% rename from dfhack/python/c api/pydfhackflags.py rename to library/python/c api/pydfhackflags.py diff --git a/dfhack/python/c api/pydftypes.py b/library/python/c api/pydftypes.py similarity index 100% rename from dfhack/python/c api/pydftypes.py rename to library/python/c api/pydftypes.py diff --git a/dfhack/python/c api/util.py b/library/python/c api/util.py similarity index 100% rename from dfhack/python/c api/util.py rename to library/python/c api/util.py diff --git a/dfhack/python/c api/vegetation.py b/library/python/c api/vegetation.py similarity index 100% rename from dfhack/python/c api/vegetation.py rename to library/python/c api/vegetation.py diff --git a/dfhack/python/dfhack_api_ctypes.py b/library/python/dfhack_api_ctypes.py similarity index 100% rename from dfhack/python/dfhack_api_ctypes.py rename to library/python/dfhack_api_ctypes.py diff --git a/dfhack/python/examples/attachtest.py b/library/python/examples/attachtest.py similarity index 100% rename from dfhack/python/examples/attachtest.py rename to library/python/examples/attachtest.py diff --git a/dfhack/python/examples/miscutils.py b/library/python/examples/miscutils.py similarity index 100% rename from dfhack/python/examples/miscutils.py rename to library/python/examples/miscutils.py diff --git a/dfhack/python/examples/position.py b/library/python/examples/position.py similarity index 100% rename from dfhack/python/examples/position.py rename to library/python/examples/position.py diff --git a/dfhack/python/examples/settlementdump.py b/library/python/examples/settlementdump.py similarity index 100% rename from dfhack/python/examples/settlementdump.py rename to library/python/examples/settlementdump.py diff --git a/dfhack/python/examples/suspendtest.py b/library/python/examples/suspendtest.py similarity index 100% rename from dfhack/python/examples/suspendtest.py rename to library/python/examples/suspendtest.py diff --git a/dfhack/python/examples/treedump.py b/library/python/examples/treedump.py similarity index 100% rename from dfhack/python/examples/treedump.py rename to library/python/examples/treedump.py diff --git a/dfhack/python/ez_setup.py b/library/python/ez_setup.py similarity index 100% rename from dfhack/python/ez_setup.py rename to library/python/ez_setup.py diff --git a/dfhack/python/linsetup.py b/library/python/linsetup.py similarity index 100% rename from dfhack/python/linsetup.py rename to library/python/linsetup.py diff --git a/dfhack/python/pydfhack.cpp b/library/python/pydfhack.cpp similarity index 100% rename from dfhack/python/pydfhack.cpp rename to library/python/pydfhack.cpp diff --git a/dfhack/python/pydfhack/__init__.py b/library/python/pydfhack/__init__.py similarity index 100% rename from dfhack/python/pydfhack/__init__.py rename to library/python/pydfhack/__init__.py diff --git a/dfhack/python/pydfhack/blocks.py b/library/python/pydfhack/blocks.py similarity index 100% rename from dfhack/python/pydfhack/blocks.py rename to library/python/pydfhack/blocks.py diff --git a/dfhack/python/pydfhack/construction.py b/library/python/pydfhack/construction.py similarity index 100% rename from dfhack/python/pydfhack/construction.py rename to library/python/pydfhack/construction.py diff --git a/dfhack/python/pydfhack/creature.py b/library/python/pydfhack/creature.py similarity index 100% rename from dfhack/python/pydfhack/creature.py rename to library/python/pydfhack/creature.py diff --git a/dfhack/python/pydfhack/decorators.py b/library/python/pydfhack/decorators.py similarity index 100% rename from dfhack/python/pydfhack/decorators.py rename to library/python/pydfhack/decorators.py diff --git a/dfhack/python/pydfhack/gui.py b/library/python/pydfhack/gui.py similarity index 100% rename from dfhack/python/pydfhack/gui.py rename to library/python/pydfhack/gui.py diff --git a/dfhack/python/pydfhack/map.py b/library/python/pydfhack/map.py similarity index 100% rename from dfhack/python/pydfhack/map.py rename to library/python/pydfhack/map.py diff --git a/dfhack/python/pydfhack/materials.py b/library/python/pydfhack/materials.py similarity index 100% rename from dfhack/python/pydfhack/materials.py rename to library/python/pydfhack/materials.py diff --git a/dfhack/python/pydfhack/meminfo.py b/library/python/pydfhack/meminfo.py similarity index 100% rename from dfhack/python/pydfhack/meminfo.py rename to library/python/pydfhack/meminfo.py diff --git a/dfhack/python/pydfhack/mixins.py b/library/python/pydfhack/mixins.py similarity index 100% rename from dfhack/python/pydfhack/mixins.py rename to library/python/pydfhack/mixins.py diff --git a/dfhack/python/pydfhack/position.py b/library/python/pydfhack/position.py similarity index 100% rename from dfhack/python/pydfhack/position.py rename to library/python/pydfhack/position.py diff --git a/dfhack/python/pydfhack/pydfapi.py b/library/python/pydfhack/pydfapi.py similarity index 100% rename from dfhack/python/pydfhack/pydfapi.py rename to library/python/pydfhack/pydfapi.py diff --git a/dfhack/python/pydfhack/pydfhackflags.py b/library/python/pydfhack/pydfhackflags.py similarity index 100% rename from dfhack/python/pydfhack/pydfhackflags.py rename to library/python/pydfhack/pydfhackflags.py diff --git a/dfhack/python/pydfhack/pydftypes.py b/library/python/pydfhack/pydftypes.py similarity index 100% rename from dfhack/python/pydfhack/pydftypes.py rename to library/python/pydfhack/pydftypes.py diff --git a/dfhack/python/pydfhack/translation.py b/library/python/pydfhack/translation.py similarity index 100% rename from dfhack/python/pydfhack/translation.py rename to library/python/pydfhack/translation.py diff --git a/dfhack/python/pydfhack/vegetation.py b/library/python/pydfhack/vegetation.py similarity index 100% rename from dfhack/python/pydfhack/vegetation.py rename to library/python/pydfhack/vegetation.py diff --git a/dfhack/python/setup.py b/library/python/setup.py similarity index 100% rename from dfhack/python/setup.py rename to library/python/setup.py diff --git a/dfhack/python/test.py b/library/python/test.py similarity index 100% rename from dfhack/python/test.py rename to library/python/test.py diff --git a/dfhack/python/tools/shell.py b/library/python/tools/shell.py similarity index 100% rename from dfhack/python/tools/shell.py rename to library/python/tools/shell.py diff --git a/dfhack/python/tools/trees.py b/library/python/tools/trees.py similarity index 100% rename from dfhack/python/tools/trees.py rename to library/python/tools/trees.py diff --git a/dfhack/shm/CMakeLists.txt b/library/shm/CMakeLists.txt similarity index 100% rename from dfhack/shm/CMakeLists.txt rename to library/shm/CMakeLists.txt diff --git a/dfhack/shm/mod-core.cpp b/library/shm/mod-core.cpp similarity index 99% rename from dfhack/shm/mod-core.cpp rename to library/shm/mod-core.cpp index 467a7a590..db74b9eae 100644 --- a/dfhack/shm/mod-core.cpp +++ b/library/shm/mod-core.cpp @@ -27,7 +27,7 @@ distribution. */ #include -#include "../include/integers.h" +#include "../include/DFIntegers.h" #include #include #include diff --git a/dfhack/shm/mod-core.h b/library/shm/mod-core.h similarity index 100% rename from dfhack/shm/mod-core.h rename to library/shm/mod-core.h diff --git a/dfhack/shm/mod-creature2010.h b/library/shm/mod-creature2010.h similarity index 100% rename from dfhack/shm/mod-creature2010.h rename to library/shm/mod-creature2010.h diff --git a/dfhack/shm/mod-creature40d.cpp b/library/shm/mod-creature40d.cpp similarity index 99% rename from dfhack/shm/mod-creature40d.cpp rename to library/shm/mod-creature40d.cpp index f968483f8..627719a0c 100644 --- a/dfhack/shm/mod-creature40d.cpp +++ b/library/shm/mod-creature40d.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include "shms.h" #include "mod-core.h" diff --git a/dfhack/shm/mod-creature40d.h b/library/shm/mod-creature40d.h similarity index 100% rename from dfhack/shm/mod-creature40d.h rename to library/shm/mod-creature40d.h diff --git a/dfhack/shm/mod-maps.cpp b/library/shm/mod-maps.cpp similarity index 99% rename from dfhack/shm/mod-maps.cpp rename to library/shm/mod-maps.cpp index 3e79d487e..e0bacd2e1 100644 --- a/dfhack/shm/mod-maps.cpp +++ b/library/shm/mod-maps.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include "shms.h" #include "mod-core.h" diff --git a/dfhack/shm/mod-maps.h b/library/shm/mod-maps.h similarity index 98% rename from dfhack/shm/mod-maps.h rename to library/shm/mod-maps.h index 96403d311..aafc355cd 100644 --- a/dfhack/shm/mod-maps.h +++ b/library/shm/mod-maps.h @@ -25,8 +25,7 @@ distribution. #ifndef MOD_MAPS_H #define MOD_MAPS_H -// increment on every change -#include +#include "dfhack/DFTypes.h" namespace DFHack { @@ -34,8 +33,8 @@ namespace DFHack { namespace Maps { - -#define MAPS_VERSION 3 +// increment on every change +#define MAPS_VERSION 4 typedef struct { uint32_t map_offset;// = d->offset_descriptor->getAddress ("map_data"); diff --git a/dfhack/shm/readme.txt b/library/shm/readme.txt similarity index 100% rename from dfhack/shm/readme.txt rename to library/shm/readme.txt diff --git a/dfhack/shm/shms-linux.cpp b/library/shm/shms-linux.cpp similarity index 100% rename from dfhack/shm/shms-linux.cpp rename to library/shm/shms-linux.cpp diff --git a/dfhack/shm/shms-windows.cpp b/library/shm/shms-windows.cpp similarity index 99% rename from dfhack/shm/shms-windows.cpp rename to library/shm/shms-windows.cpp index 1635cf9eb..a2fb46ac0 100644 --- a/dfhack/shm/shms-windows.cpp +++ b/library/shm/shms-windows.cpp @@ -33,7 +33,7 @@ distribution. #define DFhackCExport extern "C" __declspec(dllexport) -#include "../include/integers.h" +#include "../include/DFIntegers.h" #include #include #include "shms.h" diff --git a/dfhack/shm/shms.h b/library/shm/shms.h similarity index 100% rename from dfhack/shm/shms.h rename to library/shm/shms.h diff --git a/tools/examples/buildingsdump.cpp b/tools/examples/buildingsdump.cpp index bebc10c10..1f0be6fc7 100644 --- a/tools/examples/buildingsdump.cpp +++ b/tools/examples/buildingsdump.cpp @@ -4,22 +4,10 @@ #include #include #include -#include #include using namespace std; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include int main (int argc,const char* argv[]) { diff --git a/tools/examples/construction_dump.cpp b/tools/examples/construction_dump.cpp index b17d4febf..a48b4e6a9 100644 --- a/tools/examples/construction_dump.cpp +++ b/tools/examples/construction_dump.cpp @@ -3,25 +3,13 @@ #include #include #include -#include #include #include #include #include using namespace std; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - +#include using namespace DFHack; int main (int numargs, const char ** args) diff --git a/tools/examples/creaturedump.cpp b/tools/examples/creaturedump.cpp index 23b2ef9ba..f8b63b51f 100644 --- a/tools/examples/creaturedump.cpp +++ b/tools/examples/creaturedump.cpp @@ -2,23 +2,11 @@ #include #include -#include #include #include using namespace std; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include enum likeType { diff --git a/tools/examples/dfitemdump.cpp b/tools/examples/dfitemdump.cpp index f111e84a6..0ed6413b2 100644 --- a/tools/examples/dfitemdump.cpp +++ b/tools/examples/dfitemdump.cpp @@ -7,19 +7,10 @@ #include #include #include -#include #include using namespace std; -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include DFHack::Materials * Materials; diff --git a/tools/examples/hotkeynotedump.cpp b/tools/examples/hotkeynotedump.cpp index 58e04a46d..2e35f2796 100644 --- a/tools/examples/hotkeynotedump.cpp +++ b/tools/examples/hotkeynotedump.cpp @@ -2,15 +2,9 @@ // Or Hot Keynote Dump? :P #include #include -#include #include using namespace std; - -#include -#include -#include -#include -#include +#include int main (void) diff --git a/tools/examples/materialtest.cpp b/tools/examples/materialtest.cpp index f37c101b6..65426e4ba 100644 --- a/tools/examples/materialtest.cpp +++ b/tools/examples/materialtest.cpp @@ -2,20 +2,12 @@ #include #include -#include #include #include #include using namespace std; -#include -#include -#include -#include -#include -#include -#include -#include +#include int main (int numargs, const char ** args) { diff --git a/tools/examples/position.cpp b/tools/examples/position.cpp index b39d2bf46..5f666ec4e 100644 --- a/tools/examples/position.cpp +++ b/tools/examples/position.cpp @@ -2,15 +2,11 @@ #include #include -#include #include #include using namespace std; -#include -#include -#include -#include +#include int main (void) { diff --git a/tools/examples/spatterdump.cpp b/tools/examples/spatterdump.cpp index baf709923..3d3b92102 100644 --- a/tools/examples/spatterdump.cpp +++ b/tools/examples/spatterdump.cpp @@ -3,26 +3,13 @@ #include #include #include -#include #include #include #include #include using namespace std; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include using namespace DFHack; diff --git a/tools/examples/treedump.cpp b/tools/examples/treedump.cpp index 5c4539c83..7e54db674 100644 --- a/tools/examples/treedump.cpp +++ b/tools/examples/treedump.cpp @@ -3,25 +3,13 @@ #include #include #include -#include #include #include #include #include using namespace std; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include int main (int numargs, const char ** args) { diff --git a/tools/examples/veinlook.cpp b/tools/examples/veinlook.cpp index 669341bb7..7f4bcd13a 100644 --- a/tools/examples/veinlook.cpp +++ b/tools/examples/veinlook.cpp @@ -1,4 +1,3 @@ -#include #include // for memset #include #include @@ -16,16 +15,7 @@ using namespace std; #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include using namespace DFHack; diff --git a/tools/playground/catsplosion.cpp b/tools/playground/catsplosion.cpp index 692724007..08d5c8961 100644 --- a/tools/playground/catsplosion.cpp +++ b/tools/playground/catsplosion.cpp @@ -4,7 +4,6 @@ // and due within 2 in-game hours... #include -#include #include #include #include @@ -15,15 +14,8 @@ #include using namespace std; -#include -#include -#include -#include -#include -#include +#include #include -#include -#include using namespace DFHack; diff --git a/tools/playground/dfbauxite.cpp b/tools/playground/dfbauxite.cpp index fc93ab151..3a2fdb978 100644 --- a/tools/playground/dfbauxite.cpp +++ b/tools/playground/dfbauxite.cpp @@ -15,14 +15,13 @@ Based on code from and uses DFHack - www.sourceforge.net/projects/dfhack using namespace std; -#include -#include +#include +#include #include #include #include #include #include -#include using namespace DFHack; diff --git a/tools/playground/digger.cpp b/tools/playground/digger.cpp index ad2f380fa..54983aa27 100644 --- a/tools/playground/digger.cpp +++ b/tools/playground/digger.cpp @@ -5,7 +5,6 @@ // TODO add a sort of "sub-target" to dig() to make it able to designate stone as well #include -#include #include #include #include @@ -13,12 +12,8 @@ #include using namespace std; -#include -#include -#include -#include +#include #include -#include // counts the occurances of a certain element in a vector // used to determine of a given tile is a target diff --git a/tools/playground/digger2.cpp b/tools/playground/digger2.cpp index da682f50f..27b0ce2a6 100644 --- a/tools/playground/digger2.cpp +++ b/tools/playground/digger2.cpp @@ -13,21 +13,15 @@ #include #include -#include #include +#include #include #include #include #include - -#include -#include -#include -#include +using namespace std; #include -#include -#include - +#include #define BLOCK_SIZE 16 diff --git a/tools/playground/incrementalsearch.cpp b/tools/playground/incrementalsearch.cpp index b7ea5352a..8a2f29f83 100644 --- a/tools/playground/incrementalsearch.cpp +++ b/tools/playground/incrementalsearch.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include #include @@ -19,12 +18,7 @@ using namespace std; #include #endif -#include -#include -#include -#include -#include -#include +#include //TODO: lots of optimization void searchLoop(DFHack::ContextManager & DFMgr, vector & ranges, int size, int alignment) diff --git a/tools/playground/moodump.cpp b/tools/playground/moodump.cpp index e12827c42..a6cffd854 100644 --- a/tools/playground/moodump.cpp +++ b/tools/playground/moodump.cpp @@ -1,20 +1,9 @@ #include #include -#include #include #include using namespace std; - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include DFHack::Materials * Materials; DFHack::memory_info *mem; diff --git a/tools/playground/test.cpp b/tools/playground/test.cpp index becd10c96..e62b35d2a 100644 --- a/tools/playground/test.cpp +++ b/tools/playground/test.cpp @@ -1,29 +1,15 @@ #include #include #include -#include #include #include #include #include using namespace std; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - +#include using namespace DFHack; + int main (int numargs, const char ** args) { DFHack::ContextManager DFMgr("Memory.xml"); diff --git a/tools/supported/attachtest.cpp b/tools/supported/attachtest.cpp index ecee2f84d..83cf426a0 100644 --- a/tools/supported/attachtest.cpp +++ b/tools/supported/attachtest.cpp @@ -3,14 +3,10 @@ #include #include -#include #include #include using namespace std; -#include -#include -#include -#include +#include int main (void) { diff --git a/tools/supported/cleanmap.cpp b/tools/supported/cleanmap.cpp index 5c383eb53..78081f7fd 100644 --- a/tools/supported/cleanmap.cpp +++ b/tools/supported/cleanmap.cpp @@ -1,18 +1,12 @@ // Map cleaner. Removes all the snow, mud spills, blood and vomit from map tiles. #include -#include #include #include +#include using namespace std; -#include -#include -#include -#include -#include -#include -#include +#include int main (void) { diff --git a/tools/supported/expbench.cpp b/tools/supported/expbench.cpp index 8ccbe7b63..9141e83f3 100644 --- a/tools/supported/expbench.cpp +++ b/tools/supported/expbench.cpp @@ -1,7 +1,6 @@ // This program exports the entire map from DF. Takes roughly 6.6 seconds for 1000 cycles on my Linux machine. ~px #include -#include #include #include #include @@ -9,10 +8,7 @@ using namespace std; -#include -#include -#include -#include +#include void print_progress (int current, int total) { diff --git a/tools/supported/flows.cpp b/tools/supported/flows.cpp index f2e77cca1..989cae319 100644 --- a/tools/supported/flows.cpp +++ b/tools/supported/flows.cpp @@ -1,14 +1,10 @@ // This tool counts static tiles and active flows of water and magma. #include -#include #include using namespace std; -#include -#include -#include -#include +#include int main (void) { diff --git a/tools/supported/liquids.cpp b/tools/supported/liquids.cpp index 6587dabcb..39344b4c1 100644 --- a/tools/supported/liquids.cpp +++ b/tools/supported/liquids.cpp @@ -2,17 +2,11 @@ // enable magma buildings at this time. #include -#include #include #include using namespace std; -#include -#include -#include -#include -#include -#include +#include int main (void) { diff --git a/tools/supported/probe.cpp b/tools/supported/probe.cpp index c183674b8..9d6e89365 100644 --- a/tools/supported/probe.cpp +++ b/tools/supported/probe.cpp @@ -3,27 +3,13 @@ #include #include #include -#include #include #include #include #include using namespace std; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include using namespace DFHack; int main (int numargs, const char ** args) diff --git a/tools/supported/prospector.cpp b/tools/supported/prospector.cpp index d0d18599e..5438d113f 100644 --- a/tools/supported/prospector.cpp +++ b/tools/supported/prospector.cpp @@ -8,7 +8,6 @@ // TODO: GUI #include -#include #include // for memset #include #include @@ -16,12 +15,7 @@ #include using namespace std; -#include -#include -#include -#include -#include -#include +#include int main (int argc, const char* argv[]) { diff --git a/tools/supported/reveal.cpp b/tools/supported/reveal.cpp index 03f062b08..66ec3d92f 100644 --- a/tools/supported/reveal.cpp +++ b/tools/supported/reveal.cpp @@ -1,16 +1,11 @@ // This is a reveal program. It reveals the map. #include -#include #include #include using namespace std; -#include -#include -#include -#include - +#include struct hideblock { diff --git a/tools/supported/suspendtest.cpp b/tools/supported/suspendtest.cpp index d7c0618b2..ea29de7eb 100644 --- a/tools/supported/suspendtest.cpp +++ b/tools/supported/suspendtest.cpp @@ -2,15 +2,12 @@ #include #include -#include #include #include #include using namespace std; -#include -#include -#include +#include int main (void) { string blah; diff --git a/tools/supported/unstuck.cpp b/tools/supported/unstuck.cpp index 0c8c17c7e..2a74c3f0f 100644 --- a/tools/supported/unstuck.cpp +++ b/tools/supported/unstuck.cpp @@ -2,16 +2,12 @@ #include #include -#include #include #include #include using namespace std; -#include -#include -#include - +#include int main (void) { string blah; diff --git a/tools/supported/vdig.cpp b/tools/supported/vdig.cpp index d45eaa041..ca70cc400 100644 --- a/tools/supported/vdig.cpp +++ b/tools/supported/vdig.cpp @@ -1,5 +1,4 @@ #include -#include #include // for memset #include #include @@ -9,14 +8,7 @@ #include using namespace std; -#include -#include -#include -#include -#include -#include -#include -#include +#include #include #define MAX_DIM 0x300