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>
51 lines
755 B
C++
51 lines
755 B
C++
#include "StdAfx.h"
|
|
#include "Symbol.h"
|
|
|
|
CSymbol::CSymbol()
|
|
{
|
|
id = MID_SYMBOL;
|
|
iType = ST_UNKNOWN;
|
|
}
|
|
|
|
CSymbol::~CSymbol()
|
|
{
|
|
|
|
}
|
|
|
|
bool CSymbol::Equal(CSymbol dif)
|
|
{
|
|
if (dif.iType/10 == iType/10) return true;
|
|
return false;
|
|
}
|
|
|
|
bool CSymbol::Less(CSymbol dif)
|
|
{
|
|
if (dif.iType/10 > iType/10) return true;
|
|
return false;
|
|
}
|
|
|
|
int CSymbol::GetType()
|
|
{
|
|
return iType;
|
|
}
|
|
|
|
void CSymbol::SetType(int Type)
|
|
{
|
|
iType=Type;
|
|
}
|
|
|
|
int CSymbol::issymbol(int ch)
|
|
{
|
|
switch(ch)
|
|
{
|
|
case SY_PLUS : return ST_PLUS;
|
|
case SY_MINUS : return ST_MINUS;
|
|
case SY_MULTIPLY: return ST_MULTIPLY;
|
|
case SY_DIVIDE : return SY_DIVIDE;
|
|
case SY_CARET : return SY_CARET;
|
|
case SY_OPEN : return SY_OPEN;
|
|
case SY_CLOSE : return ST_CLOSE;
|
|
}
|
|
return 0;
|
|
}
|