예제 #1
0
		/**
		 * Parses specified character.
		 * Sets error if parsed character doesnt match.
		 */
		void parse(char ch)
		{
			char ch2;
			if(!m_file.readChar(&ch2) || ch2 != ch)
			{
				m_err = MapFile::ERROR_PARSE;
				m_errLine = m_file.line();
			}
		}
예제 #2
0
		/**
		 * Parses specified string.
		 * Sets error if parsed string doesnt match.
		 */
		void parse(const char* str)
		{
			char buf[256];
			m_file.readString(buf, sizeof(buf));
			if(strcmp(str, buf))
			{
				m_err = MapFile::ERROR_PARSE;
				m_errLine = m_file.line();
			}
		}