port: CPythonSkill + skill module + EterBase/Poly (1:1 40250)
Copy PythonSkill.cpp and the EterBase/Poly formula parser verbatim, drop the pending stand-in and the skill module stub, register initskill() after initfly() and build CPythonSkill in m_pySkill's place. LoadLocaleData now loads skilldesc/skilltable. Skill and item icon handles go through Py_BuildPointer/PyTuple_GetPointer (ILP32 ints truncate 64-bit pointers). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7358bf444a
commit
03de3f314a
@@ -283,13 +283,13 @@ PyObject * itemGetIconInstance(PyObject * poSelf, PyObject * poArgs)
|
||||
CGraphicImageInstance * pImageInstance = CGraphicImageInstance::New();
|
||||
pImageInstance->SetImagePointer(pImage);
|
||||
|
||||
return Py_BuildValue("i", pImageInstance);
|
||||
return Py_BuildPointer(pImageInstance); // PORT: was Py_BuildValue("i", ...) (ILP32 handle)
|
||||
}
|
||||
|
||||
PyObject * itemDeleteIconInstance(PyObject * poSelf, PyObject * poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
CGraphicImageInstance * iHandle; // PORT: was int (ILP32 handle)
|
||||
if (!PyTuple_GetPointer(poArgs, 0, &iHandle))
|
||||
return Py_BadArgument();
|
||||
|
||||
CGraphicImageInstance::Delete((CGraphicImageInstance *) iHandle);
|
||||
|
||||
Reference in New Issue
Block a user