From cc7b7d9f0f29c4262ed02a93fffdb3d17f564410 Mon Sep 17 00:00:00 2001 From: doomchild Date: Wed, 7 Apr 2010 16:26:41 -0500 Subject: [PATCH] updated for API changes --- dfhack/python/DF_CreatureManager.cpp | 2 +- dfhack/python/DF_CreatureType.cpp | 3 ++- dfhack/python/DF_Helpers.cpp | 10 ++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dfhack/python/DF_CreatureManager.cpp b/dfhack/python/DF_CreatureManager.cpp index 47800b7f2..9a1d229f2 100644 --- a/dfhack/python/DF_CreatureManager.cpp +++ b/dfhack/python/DF_CreatureManager.cpp @@ -105,7 +105,7 @@ static PyObject* DF_CreatureManager_Finish(DF_CreatureManager* self, PyObject* a static PyObject* DF_CreatureManager_ReadCreature(DF_CreatureManager* self, PyObject* args) { uint32_t index; - t_creature furball; + DFHack::t_creature furball; if(self->creature_Ptr != NULL) { diff --git a/dfhack/python/DF_CreatureType.cpp b/dfhack/python/DF_CreatureType.cpp index 503a6db56..3c55b516e 100644 --- a/dfhack/python/DF_CreatureType.cpp +++ b/dfhack/python/DF_CreatureType.cpp @@ -29,10 +29,11 @@ distribution. #include "structmember.h" #include "DF_Imports.cpp" #include "DF_Helpers.cpp" -#include "DFTypes.h" using namespace DFHack; +#include "modules/Creatures.h" + struct DF_Creature_Base { PyObject_HEAD diff --git a/dfhack/python/DF_Helpers.cpp b/dfhack/python/DF_Helpers.cpp index 587e07f04..65d5f5f9a 100644 --- a/dfhack/python/DF_Helpers.cpp +++ b/dfhack/python/DF_Helpers.cpp @@ -31,15 +31,17 @@ distribution. using namespace DFHack; +#include "modules/Creatures.h" + static PyObject* BuildMatglossPair(DFHack::t_matglossPair& matgloss) { return Py_BuildValue("ii", matgloss.type, matgloss.index); } -static PyObject* BuildTreeDesc(DFHack::t_tree_desc& tree) -{ - return Py_BuildValue("OO", BuildMatglossPair(tree.material), Py_BuildValue("III", tree.x, tree.y, tree.z)); -} +// static PyObject* BuildTreeDesc(DFHack::t_tree_desc& tree) +// { + // return Py_BuildValue("OO", BuildMatglossPair(tree.material), Py_BuildValue("III", tree.x, tree.y, tree.z)); +// } static PyObject* BuildSkill(DFHack::t_skill& skill) {