summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE119
-rw-r--r--data/Memory-ng.xml26
-rw-r--r--tools/playground/digger2.cpp1
-rw-r--r--tools/supported/SegmentedFinder.h1
-rw-r--r--tools/supported/incrementalsearch.cpp7
-rw-r--r--tools/supported/vdig.cpp15
6 files changed, 150 insertions, 19 deletions
diff --git a/LICENSE b/LICENSE
index 9c825920..4cfc6a66 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,5 @@
+----------------------------------------------------------------------
+License of dfhack
github.com/peterix/dfhack
Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf
@@ -19,3 +21,120 @@ must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
+
+----------------------------------------------------------------------
+License of library/include/dfhack/DFstdint_win.h
+
+ISO C9x compliant stdint.h for Microsoft Visual Studio
+Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
+
+ Copyright (c) 2006-2008 Alexander Chemeris
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. The name of the author may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------------
+License of argstream (used by some utilities for parsing command line params)
+
+Copyright (C) 2004 Xavier Decoret <Xavier.Decoret@imag.fr>
+
+argsteam is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+Foobar is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Foobar; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+This library is used by:
+tools/playground/catsplosion.cpp
+tools/playground/digger.cpp
+tools/supported/vdig.cpp
+
+----------------------------------------------------------------------------
+License of "RSA Data Security, Inc. MD5 Message-Digest Algorithm"
+Used to identify DF binaries.
+
+Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+rights reserved.
+
+License to copy and use this software is granted provided that it
+is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+Algorithm" in all material mentioning or referencing this software
+or this function.
+
+License is also granted to make and use derivative works provided
+that such works are identified as "derived from the RSA Data
+Security, Inc. MD5 Message-Digest Algorithm" in all material
+mentioning or referencing the derived work.
+
+RSA Data Security, Inc. makes no representations concerning either
+the merchantability of this software or the suitability of this
+software for any particular purpose. It is provided "as is"
+without express or implied warranty of any kind.
+
+These notices must be retained in any copies of any part of this
+documentation and/or software.
+-----------------------------------------------------------------
+License of the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" C++ wrapper:
+
+This is my wrapper-class to create
+a MD5 Hash from a string and a file.
+
+This code is completly free, you
+can copy it, modify it, or do
+what ever you want with it.
+
+Feb. 2005
+Benjamin Grüdelbach
+------------------------------------------------------------------
+License of the used XML reader library
+
+www.sourceforge.net/projects/tinyxml
+Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.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. \ No newline at end of file
diff --git a/data/Memory-ng.xml b/data/Memory-ng.xml
index cfe9b833..23455ce7 100644
--- a/data/Memory-ng.xml
+++ b/data/Memory-ng.xml
@@ -1939,10 +1939,10 @@
</Group>
<Group name="Materials" valid="false" >
<Address name="creature_type_vector" value="0x171e880" valid="true" />
- <Address name="inorganics" value="0x171e790 0x16e527C" valid="true" />
- <Address name="organics_all" value="0x171e7B0 0x16e529C" valid="true" />
- <Address name="organics_plants" value="0x171e7C0 0x16e52AC" valid="true" />
- <Address name="organics_trees" value="0x171e7E0 0x16e52CC" valid="true" />
+ <Address name="inorganics" value="0x171e790" valid="true" />
+ <Address name="organics_all" value="0x171e7B0" valid="true" />
+ <Address name="organics_plants" value="0x171e7C0" valid="true" />
+ <Address name="organics_trees" value="0x171e7E0" valid="true" />
</Group>
<Group name="GUI" valid="false">
<Address name="pause_state" value="0x14c9be1" valid="true" />
@@ -2476,14 +2476,14 @@
<Address name="region_x" value="0x93c045c" />
<Address name="region_y" value="0x93c0460" />
<Address name="region_z" value="0x93c0464" />
- <Address name="world_size_x" value="0x93c1ab0" />
- <Address name="world_size_y" value="0x93c1ab2" />
- <Address name="x_count" value="0x93c0450" />
<Address name="x_count_block" value="0x93c0444" />
- <Address name="y_count" value="0x93c0454" />
<Address name="y_count_block" value="0x93c0448" />
- <Address name="z_count" value="0x93c0458" />
<Address name="z_count_block" value="0x93c044c" />
+ <Address name="x_count" value="0x93c0450" />
+ <Address name="y_count" value="0x93c0454" />
+ <Address name="z_count" value="0x93c0458" />
+ <Address name="world_size_x" value="0x93c1ab0" />
+ <Address name="world_size_y" value="0x93c1ab2" />
<Group name="block" valid="true" />
<Group name="features" valid="false" />
<Group name="geology" valid="false" />
@@ -2496,9 +2496,13 @@
<Group name="name" valid="true" />
</Offsets>
</Version>
- <Version name="v0.31.19 linux" os="linux" base="v0.31.18 linux">
+ <Version name="v0.31.19 linux" os="linux" base="v0.31.18 linux" rebase="-0x77738">
<MD5 value="8fcb1f10af9cc2bda47d2acf42e1db54" />
- <Offsets valid="false" />
+ <Offsets>
+ <Group name="Position">
+ ... stuff
+ </Group>
+ </Offsets>
</Version>
</DFHack>
diff --git a/tools/playground/digger2.cpp b/tools/playground/digger2.cpp
index 91507bcc..dc4e9d27 100644
--- a/tools/playground/digger2.cpp
+++ b/tools/playground/digger2.cpp
@@ -21,7 +21,6 @@
#include <assert.h>
using namespace std;
-#include <argstream.h>
#include <DFHack.h>
#include <dfhack/DFTileTypes.h>
#define BLOCK_SIZE 16
diff --git a/tools/supported/SegmentedFinder.h b/tools/supported/SegmentedFinder.h
index 1ab9cead..6a0c1042 100644
--- a/tools/supported/SegmentedFinder.h
+++ b/tools/supported/SegmentedFinder.h
@@ -395,6 +395,7 @@ public:
Allocate((d->length+sizeof(T)) * 2);
(*(T *)( (uint64_t)d->object + d->length)) = what;
d->length += sizeof(T);
+ return true;
}
Bytestreamdata * d;
bool constant;
diff --git a/tools/supported/incrementalsearch.cpp b/tools/supported/incrementalsearch.cpp
index 8b4e93c1..8dc04cbc 100644
--- a/tools/supported/incrementalsearch.cpp
+++ b/tools/supported/incrementalsearch.cpp
@@ -749,8 +749,11 @@ void autoSearch(DFHack::Context * DF, vector <DFHack::t_memrange>& ranges)
// organics vector
to_filter = filtVectors;
- sf.Filter<uint32_t,vecTriplet>(52 * 4,to_filter,vectorLength<uint32_t>);
- sf.Filter<const char * ,vecTriplet>("MUSHROOM_HELMET_PLUMP",to_filter, vectorStringFirst);
+ sf.Filter<const char * ,vecTriplet>("MUSHROOM_HELMET_PLUMP",to_filter, vectorString);
+ sf.Filter<const char * ,vecTriplet>("MEADOW-GRASS",to_filter, vectorString);
+ sf.Filter<const char * ,vecTriplet>("TUNNEL_TUBE",to_filter, vectorString);
+ sf.Filter<const char * ,vecTriplet>("WEED_BLADE",to_filter, vectorString);
+ sf.Filter<const char * ,vecTriplet>("EYEBALL",to_filter, vectorString);
printFound(to_filter,"organics");
// tree vector
diff --git a/tools/supported/vdig.cpp b/tools/supported/vdig.cpp
index 2b235d4a..19cb037a 100644
--- a/tools/supported/vdig.cpp
+++ b/tools/supported/vdig.cpp
@@ -10,7 +10,7 @@ using namespace std;
#include <DFHack.h>
#include <dfhack/DFTileTypes.h>
-#include <argstream.h>
+//#include <argstream.h>
#define MAX_DIM 0x300
@@ -271,10 +271,12 @@ int main (int argc, char* argv[])
{
// Command line options
bool updown = false;
+ /*
argstream as(argc,argv);
as >>option('x',"updown",updown,"Dig up and down stairs to reach other z-levels.")
>>help();
+
// sane check
if (!as.isOk())
@@ -282,6 +284,9 @@ int main (int argc, char* argv[])
cout << as.errorLog();
return 1;
}
+ */
+ if(argc > 1 && strcmp(argv[1],"-x") == 0)
+ updown = true;
DFHack::ContextManager DFMgr("Memory.xml");
DFHack::Context * DF;
@@ -298,12 +303,12 @@ int main (int argc, char* argv[])
#endif
return 1;
}
-
+
uint32_t x_max,y_max,z_max;
DFHack::Maps * Maps = DF->getMaps();
DFHack::Materials * Mats = DF->getMaterials();
DFHack::Position * Pos = DF->getPosition();
-
+
// init the map
if(!Maps->Start())
{
@@ -314,12 +319,12 @@ int main (int argc, char* argv[])
#endif
return 1;
}
-
+
int32_t cx, cy, cz;
Maps->getSize(x_max,y_max,z_max);
uint32_t tx_max = x_max * 16;
uint32_t ty_max = y_max * 16;
-
+
Pos->getCursorCoords(cx,cy,cz);
while(cx == -30000)
{