diff --git a/engines/bagel/baglib/parse_object.cpp b/engines/bagel/baglib/parse_object.cpp index 01a64488844..60420eea6d4 100644 --- a/engines/bagel/baglib/parse_object.cpp +++ b/engines/bagel/baglib/parse_object.cpp @@ -24,10 +24,7 @@ namespace Bagel { -int CBagParseObject::_nIndentation; - void CBagParseObject::initialize() { - _nIndentation = 0; } CBagParseObject::CBagParseObject() { @@ -76,10 +73,6 @@ int CBagParseObject::getStringFromStream(CBagIfstream &istr, CBofString &sStr, c return ch; } -int CBagParseObject::getStringFromStream(CBagIfstream &istr, CBofString &sStr, const char cEndChar, bool bPutBack) { - return getStringFromStream(istr, sStr, CBofString(cEndChar), bPutBack); -} - int CBagParseObject::getRectFromStream(CBagIfstream &istr, CBofRect &rect) { char szLocalStr[256]; szLocalStr[0] = 0; @@ -116,54 +109,6 @@ int CBagParseObject::getRectFromStream(CBagIfstream &istr, CBofRect &rect) { return 0; } -int CBagParseObject::getVectorFromStream(CBagIfstream &istr, CBagVector &vector) { - char szLocalStr[256]; - szLocalStr[0] = 0; - CBofString str(szLocalStr, 256); - - // The first char must be a ( - char ch = (char)istr.getCh(); - if (ch != '(') - return -1; - - // Get the x-coord - getStringFromStream(istr, str, ","); - vector.x = atoi(str); - - // Get the y-coord - getStringFromStream(istr, str, ",):@", true); - vector.y = atoi(str); - - // Vector rate - vector._moveRate = 1; - ch = (char)istr.peek(); - if (ch == ',') { - istr.getCh(); - getStringFromStream(istr, str, "):@", true); - vector._moveRate = atoi(str); - } - - // Start-Stop index - ch = (char)istr.peek(); - if (ch == '~') { - istr.getCh(); - CBofRect r; - getRectFromStream(istr, r); - vector._sprStartIndex = r.left; - vector._sprEndIndex = r.top; - } - - // Start-Stop index - ch = (char)istr.peek(); - if (ch == '@') { - istr.getCh(); - getStringFromStream(istr, str, ")"); - vector._changeRate = atoi(str); - } - - return 0; -} - int CBagParseObject::getAlphaNumFromStream(CBagIfstream &istr, CBofString &sStr) { bool bDone = false; char ch = 0; diff --git a/engines/bagel/baglib/parse_object.h b/engines/bagel/baglib/parse_object.h index 081230682d6..6b52824d116 100644 --- a/engines/bagel/baglib/parse_object.h +++ b/engines/bagel/baglib/parse_object.h @@ -41,15 +41,6 @@ namespace Bagel { #define OBJ_START_DELIM '=' #define OBJ_END_DELIM ';' -// Support Vector Class -class CBagVector : public CVector { -public: - int _moveRate; - int _sprStartIndex; - int _sprEndIndex; - int _changeRate; -}; - enum ParseCodes { PARSING_DONE = 0, UPDATED_OBJECT, UNKNOWN_TOKEN }; class CBagParseObject { @@ -70,8 +61,6 @@ public: }; private: - static int _nIndentation; - static bool _bBinaryData; bool _bAttached; public: @@ -95,33 +84,11 @@ public: return PARSING_DONE; } - int setIndent(int n) { - return _nIndentation = n; - } - int getIndent() const { - return _nIndentation; - } - int tab(int n = 2) { - return _nIndentation += n; - } - int unTab(int n = 2) { - return _nIndentation -= n; - } - - int setBinaryData(bool b = true) const { - return _bBinaryData = b; - } - int isBinaryData() { - return _bBinaryData; - } - - int getStringFromStream(CBagIfstream &istr, CBofString &sStr, const char cEndChar, bool bPutBack = false); int getStringFromStream(CBagIfstream &istr, CBofString &sStr, const CBofString &sEndChars, bool bPutBack = false); int getAlphaNumFromStream(CBagIfstream &istr, CBofString &sStr); int getOperStrFromStream(CBagIfstream &istr, CBofString &sStr); int getIntFromStream(CBagIfstream &istr, int &nNum); int getRectFromStream(CBagIfstream &istr, CBofRect &rect); - int getVectorFromStream(CBagIfstream &istr, CBagVector &vector); int getKeywordFromStream(CBagIfstream &istr, KEYWORDS &keyword); int putbackStringOnStream(CBagIfstream &istr, const CBofString &sStr);