updated for API changes

develop
doomchild 2010-04-07 16:26:41 -05:00
parent 6cf74283d6
commit cc7b7d9f0f
3 changed files with 9 additions and 6 deletions

@ -105,7 +105,7 @@ static PyObject* DF_CreatureManager_Finish(DF_CreatureManager* self, PyObject* a
static PyObject* DF_CreatureManager_ReadCreature(DF_CreatureManager* self, PyObject* args) static PyObject* DF_CreatureManager_ReadCreature(DF_CreatureManager* self, PyObject* args)
{ {
uint32_t index; uint32_t index;
t_creature furball; DFHack::t_creature furball;
if(self->creature_Ptr != NULL) if(self->creature_Ptr != NULL)
{ {

@ -29,10 +29,11 @@ distribution.
#include "structmember.h" #include "structmember.h"
#include "DF_Imports.cpp" #include "DF_Imports.cpp"
#include "DF_Helpers.cpp" #include "DF_Helpers.cpp"
#include "DFTypes.h"
using namespace DFHack; using namespace DFHack;
#include "modules/Creatures.h"
struct DF_Creature_Base struct DF_Creature_Base
{ {
PyObject_HEAD PyObject_HEAD

@ -31,15 +31,17 @@ distribution.
using namespace DFHack; using namespace DFHack;
#include "modules/Creatures.h"
static PyObject* BuildMatglossPair(DFHack::t_matglossPair& matgloss) static PyObject* BuildMatglossPair(DFHack::t_matglossPair& matgloss)
{ {
return Py_BuildValue("ii", matgloss.type, matgloss.index); return Py_BuildValue("ii", matgloss.type, matgloss.index);
} }
static PyObject* BuildTreeDesc(DFHack::t_tree_desc& tree) // static PyObject* BuildTreeDesc(DFHack::t_tree_desc& tree)
{ // {
return Py_BuildValue("OO", BuildMatglossPair(tree.material), Py_BuildValue("III", tree.x, tree.y, tree.z)); // return Py_BuildValue("OO", BuildMatglossPair(tree.material), Py_BuildValue("III", tree.x, tree.y, tree.z));
} // }
static PyObject* BuildSkill(DFHack::t_skill& skill) static PyObject* BuildSkill(DFHack::t_skill& skill)
{ {