updated for new composite types

develop
doomchild 2010-04-15 12:55:31 -05:00
parent 3e70644160
commit d7d05132b2
1 changed files with 6 additions and 2 deletions

@ -33,29 +33,33 @@ static PyObject* CreatureFlags2_type = NULL;
static PyObject* DesignationFlags_type = NULL; static PyObject* DesignationFlags_type = NULL;
static PyObject* OccupancyFlags_type = NULL; static PyObject* OccupancyFlags_type = NULL;
static PyObject* ItemFlags_type = NULL; static PyObject* ItemFlags_type = NULL;
static PyObject* BlockFlags_type = NULL;
static PyObject* TypesModule = NULL; static PyObject* TypesModule = NULL;
static PyObject* Note_type = NULL; static PyObject* Note_type = NULL;
static PyObject* Construction_type = NULL; static PyObject* Construction_type = NULL;
static PyObject* Name_type = NULL; static PyObject* Name_type = NULL;
static PyObject* MapBlock40d_type = NULL;
static void DoImports() static void DoImports()
{ {
if(TypesModule == NULL) if(TypesModule == NULL)
{ {
FlagsModule = PyImport_ImportModule("pydfhackflags"); FlagsModule = PyImport_ImportModule("pydfhackflags");
CreatureFlags1_type = PyObject_GetAttrString(FlagsModule, "CreatureFlags1"); CreatureFlags1_type = PyObject_GetAttrString(FlagsModule, "CreatureFlags1");
CreatureFlags2_type = PyObject_GetAttrString(FlagsModule, "CreatureFlags2"); CreatureFlags2_type = PyObject_GetAttrString(FlagsModule, "CreatureFlags2");
DesignationFlags_type = PyObject_GetAttrString(FlagsModule, "DesignationFlags"); DesignationFlags_type = PyObject_GetAttrString(FlagsModule, "DesignationFlags");
OccupancyFlags_type = PyObject_GetAttrString(FlagsModule, "OccupancyFlags"); OccupancyFlags_type = PyObject_GetAttrString(FlagsModule, "OccupancyFlags");
ItemFlags_type = PyObject_GetAttrString(FlagsModule, "ItemFlags"); ItemFlags_type = PyObject_GetAttrString(FlagsModule, "ItemFlags");
BlockFlags_type = PyObject_GetAttrString(FlagsModule, "BlockFlags");
TypesModule = PyImport_ImportModule("pydftypes"); TypesModule = PyImport_ImportModule("pydftypes");
Note_type = PyObject_GetAttrString(TypesModule, "Note"); Note_type = PyObject_GetAttrString(TypesModule, "Note");
Construction_type = PyObject_GetAttrString(TypesModule, "Construction"); Construction_type = PyObject_GetAttrString(TypesModule, "Construction");
Name_type = PyObject_GetAttrString(TypesModule, "Name"); Name_type = PyObject_GetAttrString(TypesModule, "Name");
MapBlock40d_type = PyObject_GetAttrString(TypesModule, "MapBlock40d");
} }
} }