diff --git a/CMakeLists.txt b/CMakeLists.txt
index 173ea571d..cbe192e78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,10 +58,6 @@ SET( DFHACK_INSTALL ${DFHACK_INST_DEFAULT} CACHE STRING
'linux' for generic packaging and system installs on linux (linux default)
'ubuntu-10.10' for ubuntu maverick package.")
-SET( MEMXML_DATA_PATH . CACHE PATH
-"Path to a valid Memory.xml file.
-This is baked into the library, so when you package DFHack for linux, set it to the right path.")
-
IF(${DFHACK_INSTALL} STREQUAL "portable")
# the dfhack libraries will be installed here:
SET(DFHACK_LIBRARY_DESTINATION .)
diff --git a/Memory.xml b/Memory.xml
index 10f11db7a..1639ff148 100644
--- a/Memory.xml
+++ b/Memory.xml
@@ -805,7 +805,7 @@
-
+
@@ -1129,7 +1129,7 @@
-
+
@@ -2236,7 +2236,7 @@
-
+
@@ -3017,7 +3017,7 @@
WORLD: 0x93f77a0
-
+
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index 7706764c1..5bf1d2aea 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -112,12 +112,6 @@ SET_SOURCE_FILES_PROPERTIES( ${PROJECT_HDRS} PROPERTIES HEADER_FILE_ONLY TRUE )
LIST(APPEND PROJECT_SRCS ${PROJECT_HDRS})
-# Are we 64bit? (Damn you, ptrace()!)
-IF( CMAKE_SIZEOF_VOID_P MATCHES 8 )
- ADD_DEFINITIONS(-DHAVE_64_BIT)
-ENDIF()
-
-ADD_DEFINITIONS(-DMEMXML_DATA_PATH="${MEMXML_DATA_PATH}")
ADD_DEFINITIONS(-DBUILD_DFHACK_LIB)
IF(UNIX)
@@ -159,7 +153,7 @@ if(BUILD_DFHACK_DEVEL)
install(TARGETS dfhack
ARCHIVE DESTINATION ${DFHACK_DEVLIB_DESTINATION})
endif()
- # note the ending '/'. This means *constents* of the directory are installed
+ # note the ending '/'. This means *contents* of the directory are installed
# without the '/', the directory itself is installed
install(DIRECTORY include/
DESTINATION ${DFHACK_INCLUDES_DESTINATION}
diff --git a/library/Context.cpp b/library/Context.cpp
index 6300aa0c8..ee2c3ed0e 100644
--- a/library/Context.cpp
+++ b/library/Context.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/ContextShared.cpp b/library/ContextShared.cpp
index b2998f1d2..9284c4a40 100644
--- a/library/ContextShared.cpp
+++ b/library/ContextShared.cpp
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#include "Internal.h"
#include
diff --git a/library/Core-linux.cpp b/library/Core-linux.cpp
index a39ceed2a..4fe0ccdc9 100644
--- a/library/Core-linux.cpp
+++ b/library/Core-linux.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2011 Petr Mrázek (peterix)
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include
#include
#include
@@ -39,13 +40,15 @@ distribution.
#include "DFHack.h"
#include "dfhack/Core.h"
+#include "dfhack/FakeSDL.h"
#include
-#define DFhackCExport extern "C" __attribute__ ((visibility("default")))
-
/*******************************************************************************
* SDL part starts here *
*******************************************************************************/
+bool FirstCall(void);
+bool inited = false;
+
DFhackCExport int SDL_NumJoysticks(void)
{
DFHack::Core & c = DFHack::Core::getInstance();
@@ -56,6 +59,7 @@ DFhackCExport int SDL_NumJoysticks(void)
//static void (*_SDL_GL_SwapBuffers)(void) = 0;
static void (*_SDL_Quit)(void) = 0;
static int (*_SDL_Init)(uint32_t flags) = 0;
+static DFThread * (*_SDL_CreateThread)(int (*fn)(void *), void *data) = 0;
//static int (*_SDL_Flip)(void * some_ptr) = 0;
/*
// hook - called every tick in OpenGL mode of DF
@@ -89,6 +93,30 @@ DFhackCExport int SDL_Flip(void * some_ptr)
}
*/
+static DFMutex * (*_SDL_CreateMutex)(void) = 0;
+DFhackCExport DFMutex * SDL_CreateMutex(void)
+{
+ return _SDL_CreateMutex();
+}
+
+static int (*_SDL_mutexP)(DFMutex * mutex) = 0;
+DFhackCExport int SDL_mutexP(DFMutex * mutex)
+{
+ return _SDL_mutexP(mutex);
+}
+
+static int (*_SDL_mutexV)(DFMutex * mutex) = 0;
+DFhackCExport int SDL_mutexV(DFMutex * mutex)
+{
+ return _SDL_mutexV(mutex);
+}
+
+static void (*_SDL_DestroyMutex)(DFMutex * mutex) = 0;
+DFhackCExport void SDL_DestroyMutex(DFMutex * mutex)
+{
+ _SDL_DestroyMutex(mutex);
+}
+
// hook - called at program exit
DFhackCExport void SDL_Quit(void)
{
@@ -108,9 +136,14 @@ DFhackCExport int SDL_Init(uint32_t flags)
_SDL_Init = (int (*)( uint32_t )) dlsym(RTLD_NEXT, "SDL_Init");
//_SDL_Flip = (int (*)( void * )) dlsym(RTLD_NEXT, "SDL_Flip");
_SDL_Quit = (void (*)( void )) dlsym(RTLD_NEXT, "SDL_Quit");
+ _SDL_CreateThread = (DFThread* (*)(int (*fn)(void *), void *data))dlsym(RTLD_NEXT, "SDL_CreateThread");
+ _SDL_CreateMutex = (DFMutex*(*)())dlsym(RTLD_NEXT,"SDL_CreateMutex");
+ _SDL_DestroyMutex = (void (*)(DFMutex*))dlsym(RTLD_NEXT,"SDL_DestroyMutex");
+ _SDL_mutexP = (int (*)(DFMutex*))dlsym(RTLD_NEXT,"SDL_mutexP");
+ _SDL_mutexV = (int (*)(DFMutex*))dlsym(RTLD_NEXT,"SDL_mutexV");
// check if we got them
- if(/*_SDL_GL_SwapBuffers &&*/ _SDL_Init && _SDL_Quit)
+ if(_SDL_Init && _SDL_Quit && _SDL_CreateThread && _SDL_CreateMutex && _SDL_DestroyMutex && _SDL_mutexP && _SDL_mutexV)
{
fprintf(stderr,"dfhack: hooking successful\n");
}
@@ -122,57 +155,3 @@ DFhackCExport int SDL_Init(uint32_t flags)
}
return _SDL_Init(flags);
}
-
-
-/*******************************************************************************
-* NCURSES part starts here *
-*******************************************************************************/
-/*
-static int (*_refresh)(void) = 0;
-DFhackCExport int refresh (void)
-{
- if(_refresh)
- {
- return _refresh();
- }
- return 0;
-}
-
-static int (*_endwin)(void) = 0;
-DFhackCExport int endwin (void)
-{
- if(!errorstate)
- {
- HOOK_Shutdown();
- errorstate = true;
- }
- if(_endwin)
- {
- return _endwin();
- }
- return 0;
-}
-
-typedef void WINDOW;
-static WINDOW * (*_initscr)(void) = 0;
-DFhackCExport WINDOW * initscr (void)
-{
- // find real functions
- //_refresh = (int (*)( void )) dlsym(RTLD_NEXT, "refresh");
- _endwin = (int (*)( void )) dlsym(RTLD_NEXT, "endwin");
- _initscr = (WINDOW * (*)( void )) dlsym(RTLD_NEXT, "initscr");
- // check if we got them
- if(_refresh && _endwin && _initscr)
- {
- fprintf(stderr,"dfhack: hooking successful\n");
- }
- else
- {
- // bail, this would be a disaster otherwise
- fprintf(stderr,"dfhack: something went horribly wrong\n");
- exit(1);
- }
- //SHM_Init();
- return _initscr();
-}
-*/
\ No newline at end of file
diff --git a/library/Core-windows.cpp b/library/Core-windows.cpp
index 20291bd51..603171a36 100644
--- a/library/Core-windows.cpp
+++ b/library/Core-windows.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix)
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
/**
* This is the source for the DF <-> dfhack shm bridge,
* to be used with SDL 1.2 and DF 40d16. Windows sucks
@@ -110,6 +111,7 @@ void RedirectIOToConsole()
#include
#include
#include "dfhack/Core.h"
+#include "dfhack/FakeSDL.h"
#include
/*************************************************************************/
@@ -120,10 +122,6 @@ void RedirectIOToConsole()
bool FirstCall(void);
bool inited = false;
-// function and variable pointer... we don't try to understand what SDL does here
-typedef void * fPtr;
-typedef void * vPtr;
-
/// wrappers for SDL 1.2 functions used in 40d16
/***** Condition variables
@@ -181,6 +179,12 @@ DFhackCExport int SDL_mutexP(vPtr mutex)
return _SDL_mutexP(mutex);
}
+static int (*_SDL_mutexV)(vPtr mutex) = 0;
+DFhackCExport int SDL_mutexV(vPtr mutex)
+{
+ return _SDL_mutexV(mutex);
+}
+
static void (*_SDL_DestroyMutex)(vPtr mutex) = 0;
DFhackCExport void SDL_DestroyMutex(vPtr mutex)
{
@@ -793,6 +797,7 @@ bool FirstCall()
_SDL_WM_SetCaption = (void (*)(const char*, const char*))GetProcAddress(realSDLlib,"SDL_WM_SetCaption");
_SDL_WM_SetIcon = (void (*)(void*, uint8_t*))GetProcAddress(realSDLlib,"SDL_WM_SetIcon");
_SDL_mutexP = (int (*)(void*))GetProcAddress(realSDLlib,"SDL_mutexP");
+ _SDL_mutexV = (int (*)(void*))GetProcAddress(realSDLlib,"SDL_mutexV");
_SDL_strlcpy = (size_t (*)(char*, const char*, size_t))GetProcAddress(realSDLlib,"SDL_strlcpy");
// stuff for SDL_Image
diff --git a/library/Core.cpp b/library/Core.cpp
index e3bfbd624..ba76335fc 100644
--- a/library/Core.cpp
+++ b/library/Core.cpp
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#include "Internal.h"
#include "PlatformInternal.h"
@@ -17,11 +41,122 @@ using namespace std;
#include "dfhack/modules/Gui.h"
#include "dfhack/modules/Vegetation.h"
#include "dfhack/modules/Maps.h"
+#include
using namespace DFHack;
-DFHack::Gui * gui = 0;
-DFHack::Maps * maps = 0;
-DFHack::Vegetation * veg = 0;
+struct hideblock
+{
+ uint32_t x;
+ uint32_t y;
+ uint32_t z;
+ uint8_t hiddens [16][16];
+};
+
+int reveal (void)
+{
+ Core & c = DFHack::Core::getInstance();
+ Context * DF = c.getContext();
+ c.Suspend();
+ DFHack::Maps *Maps =DF->getMaps();
+ DFHack::World *World =DF->getWorld();
+
+ // init the map
+ if(!Maps->Start())
+ {
+ cerr << "Can't init map." << endl;
+ c.Resume();
+ return 1;
+ }
+
+ cout << "Revealing, please wait..." << endl;
+
+ uint32_t x_max, y_max, z_max;
+ DFHack::designations40d designations;
+ Maps->getSize(x_max,y_max,z_max);
+ vector hidesaved;
+
+ for(uint32_t x = 0; x< x_max;x++)
+ {
+ for(uint32_t y = 0; y< y_max;y++)
+ {
+ for(uint32_t z = 0; z< z_max;z++)
+ {
+ if(Maps->isValidBlock(x,y,z))
+ {
+ hideblock hb;
+ hb.x = x;
+ hb.y = y;
+ hb.z = z;
+ // read block designations
+ Maps->ReadDesignations(x,y,z, &designations);
+ // change the hidden flag to 0
+ for (uint32_t i = 0; i < 16;i++) for (uint32_t j = 0; j < 16;j++)
+ {
+ hb.hiddens[i][j] = designations[i][j].bits.hidden;
+ designations[i][j].bits.hidden = 0;
+ }
+ hidesaved.push_back(hb);
+ // write the designations back
+ Maps->WriteDesignations(x,y,z, &designations);
+ }
+ }
+ }
+ }
+ World->SetPauseState(true);
+ c.Resume();
+ cout << "Map revealed. The game has been paused for you." << endl;
+ cout << "Unpausing can unleash the forces of hell!" << endl << endl;
+ cout << "Press any key to unreveal." << endl;
+ cout << "Close to keep the map revealed !!FOREVER!!" << endl;
+ cin.ignore();
+ cout << "Unrevealing... please wait." << endl;
+ // FIXME: do some consistency checks here!
+ c.Suspend();
+ Maps = DF->getMaps();
+ Maps->Start();
+ for(size_t i = 0; i < hidesaved.size();i++)
+ {
+ hideblock & hb = hidesaved[i];
+ Maps->ReadDesignations(hb.x,hb.y,hb.z, &designations);
+ for (uint32_t i = 0; i < 16;i++) for (uint32_t j = 0; j < 16;j++)
+ {
+ designations[i][j].bits.hidden = hb.hiddens[i][j];
+ }
+ Maps->WriteDesignations(hb.x,hb.y,hb.z, &designations);
+ }
+ c.Resume();
+ return 0;
+}
+
+
+int fIOthread(void * _core)
+{
+ Core * core = (Core *) _core;
+ cout << "Hello from the IO thread. Have a nice day!" << endl;
+ while (true)
+ {
+ string command = "";
+ cout <<"[DFHack]# ";
+ getline(cin, command);
+ if (std::cin.eof())
+ {
+ command = "q";
+ std::cout << std::endl; // No newline from the user here!
+ }
+ if(command=="help" || command == "?")
+ {
+ cout << "It's simple really. You can run reveal with 'reveal'." << endl;
+ }
+ else if(command == "reveal")
+ {
+ reveal();
+ }
+ else
+ {
+ cout << "WHAT?" << endl;
+ }
+ }
+}
Core::Core()
{
@@ -31,80 +166,43 @@ Core::Core()
{
std::cerr << "Couldn't identify this version of DF." << std::endl;
errorstate = true;
+ return;
}
c = new DFHack::Context(p);
+ AccessMutex = SDL_CreateMutex();
+ if(!AccessMutex)
+ {
+ std::cerr << "Mutex creation failed." << std::endl;
+ errorstate = true;
+ return;
+ }
errorstate = false;
- // bullcrud, push it back to a tool
- gui = c->getGui();
- gui->Start();
- veg = c->getVegetation();
- veg->Start();
- maps = c->getMaps();
- maps->Start();
+ // lock mutex
+ SDL_mutexP(AccessMutex);
+ // create IO thread
+ DFThread * IO = SDL_CreateThread(fIOthread, 0);
+ // and let DF do its thing.
};
-// more bullcrud
-int32_t x = 0,y = 0,z = 0;
-int32_t xo = 0,yo = 0,zo = 0;
-void print_tree( DFHack::df_plant & tree)
+void Core::Suspend()
{
- //DFHack::Materials * mat = DF->getMaterials();
- printf("%d:%d = ",tree.type,tree.material);
- if(tree.watery)
- {
- std::cout << "near-water ";
- }
- //std::cout << mat->organic[tree.material].id << " ";
- if(!tree.is_shrub)
- {
- std::cout << "tree";
- }
- else
- {
- std::cout << "shrub";
- }
- std::cout << std::endl;
- printf("Grow counter: 0x%08x\n", tree.grow_counter);
- printf("temperature 1: %d\n", tree.temperature_1);
- printf("temperature 2: %d\n", tree.temperature_2);
- printf("On fire: %d\n", tree.is_burning);
- printf("hitpoints: 0x%08x\n", tree.hitpoints);
- printf("update order: %d\n", tree.update_order);
- printf("Address: 0x%x\n", &tree);
- //hexdump(DF,tree.address,13*16);
+ SDL_mutexP(AccessMutex);
+}
+
+void Core::Resume()
+{
+ SDL_mutexV(AccessMutex);
}
int Core::Update()
{
if(errorstate)
return -1;
- // And more bullcrud. Predictable!
- maps->Start();
- gui->getCursorCoords(x,y,z);
- if(x != xo || y!= yo || z != zo)
- {
- xo = x;
- yo = y;
- zo = z;
- std::cout << "Cursor: " << x << "/" << y << "/" << z << std::endl;
- if(x != -30000)
- {
- std::vector * vec;
- if(maps->ReadVegetation(x/16,y/16,z,vec))
- {
- for(size_t i = 0; i < vec->size();i++)
- {
- DFHack::df_plant * p = vec->at(i);
- if(p->x == x && p->y == y && p->z == z)
- {
- print_tree(*p);
- }
- }
- }
- else
- std::cout << "No veg vector..." << std::endl;
- }
- }
+ // do persistent stuff here
+ SDL_mutexV(AccessMutex);
+ // other threads can claim the mutex here and use DFHack.
+ // NO CODE SHOULD EVER BE PLACED HERE
+ SDL_mutexP(AccessMutex);
return 0;
};
diff --git a/library/Process-linux.cpp b/library/Process-linux.cpp
index f9dfd936e..e6b4d050d 100644
--- a/library/Process-linux.cpp
+++ b/library/Process-linux.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2011 Petr Mrázek (peterix)
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -21,6 +21,7 @@ must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
+
#include "Internal.h"
#include "PlatformInternal.h"
diff --git a/library/Process-windows.cpp b/library/Process-windows.cpp
index 543f7c700..a54a0c757 100644
--- a/library/Process-windows.cpp
+++ b/library/Process-windows.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -21,6 +21,7 @@ must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
+
#include "Internal.h"
#include "PlatformInternal.h"
#include
diff --git a/library/TileTypes.cpp b/library/TileTypes.cpp
index b6c7b1f07..c337cc0ec 100644
--- a/library/TileTypes.cpp
+++ b/library/TileTypes.cpp
@@ -1,4 +1,27 @@
-// vim: sts=4 sta et shiftwidth=4:
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#include "Internal.h"
#include "dfhack/TileTypes.h"
#include "dfhack/Export.h"
diff --git a/library/VersionInfo.cpp b/library/VersionInfo.cpp
index 5ab4eaefe..dc4a257db 100644
--- a/library/VersionInfo.cpp
+++ b/library/VersionInfo.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/VersionInfoFactory.cpp b/library/VersionInfoFactory.cpp
index cb6d1e848..3e676ece1 100644
--- a/library/VersionInfoFactory.cpp
+++ b/library/VersionInfoFactory.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
diff --git a/library/include/DFHack.h b/library/include/DFHack.h
index 336f92384..163dbd664 100644
--- a/library/include/DFHack.h
+++ b/library/include/DFHack.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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_API_H
#define DFHACK_API_H
diff --git a/library/include/dfhack/Context.h b/library/include/dfhack/Context.h
index f8b8e5da7..19d9ff478 100644
--- a/library/include/dfhack/Context.h
+++ b/library/include/dfhack/Context.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#pragma once
#ifndef CONTEXT_H_INCLUDED
diff --git a/library/include/dfhack/Core.h b/library/include/dfhack/Core.h
index 30e48a8b8..f1cc91f15 100644
--- a/library/include/dfhack/Core.h
+++ b/library/include/dfhack/Core.h
@@ -1,7 +1,32 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#include "dfhack/Pragma.h"
#include "dfhack/Export.h"
+#include "dfhack/FakeSDL.h"
namespace DFHack
{
class VersionInfoFactory;
@@ -12,6 +37,8 @@ namespace DFHack
// Better than tracking some weird variables all over the place.
class DFHACK_EXPORT Core
{
+ friend int ::SDL_NumJoysticks(void);
+ friend void ::SDL_Quit(void);
public:
static Core& getInstance()
{
@@ -19,13 +46,20 @@ namespace DFHack
static Core instance;
return instance;
}
- int Update (void);
- int Shutdown (void);
+ void Suspend(void);
+ void Resume(void);
+ DFHack::Context *getContext()
+ {
+ return c;
+ }
private:
Core();
+ int Update (void);
+ int Shutdown (void);
Core(Core const&); // Don't Implement
void operator=(Core const&); // Don't implement
bool errorstate;
+ DFMutex * AccessMutex;
// legacy mess.
DFHack::VersionInfoFactory * vif;
DFHack::Process * p;
diff --git a/library/include/dfhack/Error.h b/library/include/dfhack/Error.h
index 47991067b..946cc2d4c 100644
--- a/library/include/dfhack/Error.h
+++ b/library/include/dfhack/Error.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
diff --git a/library/include/dfhack/Export.h b/library/include/dfhack/Export.h
index 797177df7..a00d951b1 100644
--- a/library/include/dfhack/Export.h
+++ b/library/include/dfhack/Export.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#pragma once
#ifdef LINUX_BUILD
diff --git a/library/include/dfhack/MiscUtils.h b/library/include/dfhack/MiscUtils.h
index 69304ac6e..5edca1b69 100644
--- a/library/include/dfhack/MiscUtils.h
+++ b/library/include/dfhack/MiscUtils.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef DF_MISCUTILS
diff --git a/library/include/dfhack/Module.h b/library/include/dfhack/Module.h
index 431dfc2e2..c0b203fca 100644
--- a/library/include/dfhack/Module.h
+++ b/library/include/dfhack/Module.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
diff --git a/library/include/dfhack/Pragma.h b/library/include/dfhack/Pragma.h
index 74735ca50..5999faca8 100644
--- a/library/include/dfhack/Pragma.h
+++ b/library/include/dfhack/Pragma.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef DFHACK_TRANQUILITY
diff --git a/library/include/dfhack/Process.h b/library/include/dfhack/Process.h
index dbb559c3f..a300a9a70 100644
--- a/library/include/dfhack/Process.h
+++ b/library/include/dfhack/Process.h
@@ -1,6 +1,6 @@
/*
https://github.com/peterix/dfhack
-Copyright (c) 2011 Petr Mrázek (peterix)
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#pragma once
#ifndef PROCESS_H_INCLUDED
diff --git a/library/include/dfhack/TileTypes.h b/library/include/dfhack/TileTypes.h
index f31f7b96c..f6ea56c7e 100644
--- a/library/include/dfhack/TileTypes.h
+++ b/library/include/dfhack/TileTypes.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
diff --git a/library/include/dfhack/Types.h b/library/include/dfhack/Types.h
index 67ab51c25..2cc39dc7d 100644
--- a/library/include/dfhack/Types.h
+++ b/library/include/dfhack/Types.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#pragma once
#ifndef TYPES_H_INCLUDED
diff --git a/library/include/dfhack/Vector.h b/library/include/dfhack/Vector.h
index b018718ff..ec5840a0f 100644
--- a/library/include/dfhack/Vector.h
+++ b/library/include/dfhack/Vector.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#pragma once
#ifndef DFVECTOR_H_INCLUDED
diff --git a/library/include/dfhack/VersionInfo.h b/library/include/dfhack/VersionInfo.h
index f4113124c..44f2dd478 100644
--- a/library/include/dfhack/VersionInfo.h
+++ b/library/include/dfhack/VersionInfo.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#pragma once
#ifndef MEMINFO_H_INCLUDED
diff --git a/library/include/dfhack/VersionInfoFactory.h b/library/include/dfhack/VersionInfoFactory.h
index b5107baf4..ab3131305 100644
--- a/library/include/dfhack/VersionInfoFactory.h
+++ b/library/include/dfhack/VersionInfoFactory.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#pragma once
#ifndef MEMINFO_MANAGER_H_INCLUDED
diff --git a/library/include/dfhack/extra/MapExtras.h b/library/include/dfhack/extra/MapExtras.h
index f7cad8468..c8446263b 100644
--- a/library/include/dfhack/extra/MapExtras.h
+++ b/library/include/dfhack/extra/MapExtras.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef MAPEXTRAS_H
#define MAPEXTRAS_H
diff --git a/library/include/dfhack/extra/termutil.h b/library/include/dfhack/extra/termutil.h
index 7a54be6ab..702e6ba5b 100644
--- a/library/include/dfhack/extra/termutil.h
+++ b/library/include/dfhack/extra/termutil.h
@@ -1,3 +1,28 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+#pragma once
+
#ifndef TERMUTIL_H
#define TERMUTIL_H
diff --git a/library/include/dfhack/modules/Buildings.h b/library/include/dfhack/modules/Buildings.h
index d83159b33..1f4d6b347 100644
--- a/library/include/dfhack/modules/Buildings.h
+++ b/library/include/dfhack/modules/Buildings.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef CL_MOD_BUILDINGS
#define CL_MOD_BUILDINGS
diff --git a/library/include/dfhack/modules/Constructions.h b/library/include/dfhack/modules/Constructions.h
index acdf907ca..11fe5431f 100644
--- a/library/include/dfhack/modules/Constructions.h
+++ b/library/include/dfhack/modules/Constructions.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef CL_MOD_CONSTRUCTIONS
#define CL_MOD_CONSTRUCTIONS
diff --git a/library/include/dfhack/modules/Creatures.h b/library/include/dfhack/modules/Creatures.h
index e38589604..9629e3bd9 100644
--- a/library/include/dfhack/modules/Creatures.h
+++ b/library/include/dfhack/modules/Creatures.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef CL_MOD_CREATURES
#define CL_MOD_CREATURES
diff --git a/library/include/dfhack/modules/Engravings.h b/library/include/dfhack/modules/Engravings.h
index 43ae6091c..561726590 100644
--- a/library/include/dfhack/modules/Engravings.h
+++ b/library/include/dfhack/modules/Engravings.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef CL_MOD_ENGRAVINGS
#define CL_MOD_ENGRAVINGS
diff --git a/library/include/dfhack/modules/Gui.h b/library/include/dfhack/modules/Gui.h
index f27b1fd67..f52d50017 100644
--- a/library/include/dfhack/modules/Gui.h
+++ b/library/include/dfhack/modules/Gui.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef CL_MOD_GUI
#define CL_MOD_GUI
diff --git a/library/include/dfhack/modules/Items.h b/library/include/dfhack/modules/Items.h
index 396821e77..cd52d0dcf 100644
--- a/library/include/dfhack/modules/Items.h
+++ b/library/include/dfhack/modules/Items.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef CL_MOD_ITEMS
#define CL_MOD_ITEMS
diff --git a/library/include/dfhack/modules/Maps.h b/library/include/dfhack/modules/Maps.h
index 1c13f000c..020942510 100644
--- a/library/include/dfhack/modules/Maps.h
+++ b/library/include/dfhack/modules/Maps.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
/*******************************************************************************
M A P S
Read and write DF's map
diff --git a/library/include/dfhack/modules/Materials.h b/library/include/dfhack/modules/Materials.h
index a3bc8a33c..fe4e052a4 100644
--- a/library/include/dfhack/modules/Materials.h
+++ b/library/include/dfhack/modules/Materials.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef CL_MOD_MATERIALS
#define CL_MOD_MATERIALS
diff --git a/library/include/dfhack/modules/Translation.h b/library/include/dfhack/modules/Translation.h
index 790b10e88..b9581567f 100644
--- a/library/include/dfhack/modules/Translation.h
+++ b/library/include/dfhack/modules/Translation.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef CL_MOD_TRANSLATION
#define CL_MOD_TRANSLATION
diff --git a/library/include/dfhack/modules/Vegetation.h b/library/include/dfhack/modules/Vegetation.h
index 4e6d5e354..9a2a9c13f 100644
--- a/library/include/dfhack/modules/Vegetation.h
+++ b/library/include/dfhack/modules/Vegetation.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef CL_MOD_VEGETATION
#define CL_MOD_VEGETATION
diff --git a/library/include/dfhack/modules/WindowIO.h b/library/include/dfhack/modules/WindowIO.h
index 0f57ab9af..e5bbf1f67 100644
--- a/library/include/dfhack/modules/WindowIO.h
+++ b/library/include/dfhack/modules/WindowIO.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -21,6 +21,7 @@ must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
+
#pragma once
#ifndef KEYS_H_INCLUDED
#define KEYS_H_INCLUDED
diff --git a/library/include/dfhack/modules/World.h b/library/include/dfhack/modules/World.h
index d9e40c0a9..bdd7a0bef 100644
--- a/library/include/dfhack/modules/World.h
+++ b/library/include/dfhack/modules/World.h
@@ -1,3 +1,27 @@
+/*
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
+
#pragma once
#ifndef CL_MOD_WORLD
#define CL_MOD_WORLD
diff --git a/library/modules/Buildings.cpp b/library/modules/Buildings.cpp
index 01e129e2a..1a738883a 100644
--- a/library/modules/Buildings.cpp
+++ b/library/modules/Buildings.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/modules/Constructions.cpp b/library/modules/Constructions.cpp
index 98e74fd0b..a6557b101 100644
--- a/library/modules/Constructions.cpp
+++ b/library/modules/Constructions.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/modules/Creatures.cpp b/library/modules/Creatures.cpp
index 23435261d..da90b565e 100644
--- a/library/modules/Creatures.cpp
+++ b/library/modules/Creatures.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/modules/Engravings.cpp b/library/modules/Engravings.cpp
index 7246b5276..f73491a92 100644
--- a/library/modules/Engravings.cpp
+++ b/library/modules/Engravings.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp
index 4e2e6f700..c07b006bc 100644
--- a/library/modules/Gui.cpp
+++ b/library/modules/Gui.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/modules/Items.cpp b/library/modules/Items.cpp
index 6df3b6e61..2a6a2ceda 100644
--- a/library/modules/Items.cpp
+++ b/library/modules/Items.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/modules/Maps.cpp b/library/modules/Maps.cpp
index d03497280..352305378 100644
--- a/library/modules/Maps.cpp
+++ b/library/modules/Maps.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/modules/Materials.cpp b/library/modules/Materials.cpp
index c812e384f..1b32999ca 100644
--- a/library/modules/Materials.cpp
+++ b/library/modules/Materials.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/modules/Translation.cpp b/library/modules/Translation.cpp
index e186492af..0f8343695 100644
--- a/library/modules/Translation.cpp
+++ b/library/modules/Translation.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
diff --git a/library/modules/Vegetation.cpp b/library/modules/Vegetation.cpp
index 7ed8be040..5fdff8b50 100644
--- a/library/modules/Vegetation.cpp
+++ b/library/modules/Vegetation.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
diff --git a/library/modules/World.cpp b/library/modules/World.cpp
index 0862db5f0..9c74fbcf4 100644
--- a/library/modules/World.cpp
+++ b/library/modules/World.cpp
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -22,6 +22,7 @@ must not be misrepresented as being the original software.
distribution.
*/
+
#include "Internal.h"
#include
#include
diff --git a/library/private/ContextShared.h b/library/private/ContextShared.h
index 4a248d0b3..11d11bb25 100644
--- a/library/private/ContextShared.h
+++ b/library/private/ContextShared.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
diff --git a/library/private/Internal.h b/library/private/Internal.h
index c87a8f44f..c42baaefa 100644
--- a/library/private/Internal.h
+++ b/library/private/Internal.h
@@ -1,6 +1,6 @@
/*
-www.sourceforge.net/projects/dfhack
-Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
diff --git a/library/private/ModuleFactory.h b/library/private/ModuleFactory.h
index e3a0567c1..f13d57f44 100644
--- a/library/private/ModuleFactory.h
+++ b/library/private/ModuleFactory.h
@@ -1,26 +1,26 @@
/*
- w ww.so*urceforge.net/projects/dfhack
- Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
-
- 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.
- */
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
#pragma once
diff --git a/library/private/PlatformInternal.h b/library/private/PlatformInternal.h
index 4b2a3f424..d29115a83 100644
--- a/library/private/PlatformInternal.h
+++ b/library/private/PlatformInternal.h
@@ -1,26 +1,26 @@
/*
- * www.sourceforge.net/projects/dfhack
- * Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
- *
- * 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.
- */
+https://github.com/peterix/dfhack
+Copyright (c) 2009-2011 Petr Mrázek (peterix@gmail.com)
+
+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.
+*/
#pragma once