2008-06-18 23:49:47 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* $URL$
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef XML_PARSER_H
|
|
|
|
#define XML_PARSER_H
|
|
|
|
|
|
|
|
#include "common/scummsys.h"
|
|
|
|
#include "graphics/surface.h"
|
|
|
|
#include "common/system.h"
|
|
|
|
#include "common/xmlparser.h"
|
2008-06-25 11:34:58 +00:00
|
|
|
#include "common/stream.h"
|
2008-06-25 14:19:56 +00:00
|
|
|
#include "common/file.h"
|
2008-06-18 23:49:47 +00:00
|
|
|
|
|
|
|
#include "common/hashmap.h"
|
|
|
|
#include "common/hash-str.h"
|
|
|
|
#include "common/stack.h"
|
|
|
|
|
|
|
|
namespace Common {
|
2008-07-30 13:33:32 +00:00
|
|
|
|
|
|
|
/***********************************************
|
|
|
|
**** XMLParser.cpp/h -- Generic XML Parser ****
|
|
|
|
***********************************************
|
|
|
|
|
|
|
|
This is a simple implementation of a generic parser which is able to
|
|
|
|
interpret a subset of the XML language.
|
|
|
|
|
|
|
|
The XMLParser class is virtual, and must be derived into a child class,
|
|
|
|
called a Custom Parser Class, which will manage the parsed data for your
|
|
|
|
specific needs.
|
|
|
|
|
|
|
|
Custom Parser Classes have two basic requirements:
|
|
|
|
They must inherit directly the XMLParser class, and they must define the
|
|
|
|
parsing layout of the XML file.
|
|
|
|
|
|
|
|
Declaring the XML layout is done with the help of the CUSTOM_XML_PARSER()
|
2008-07-30 14:08:07 +00:00
|
|
|
macro: this macro must appear once inside the Custom Parser Class
|
|
|
|
declaration, and takes a single parameter, the name of the Custom Parser
|
|
|
|
Class.
|
2008-07-30 13:33:32 +00:00
|
|
|
|
2008-07-30 14:08:07 +00:00
|
|
|
The macro must be followed by the actual layout of the XML files to be
|
|
|
|
parsed, and closed with the PARSER_END() macro. The layout of XML files
|
|
|
|
is defined by the use of 3 helper macros: XML_KEY(), KEY_END() and
|
|
|
|
XML_PROP().
|
2008-07-30 13:33:32 +00:00
|
|
|
|
|
|
|
Here's a sample of its usage:
|
|
|
|
|
|
|
|
=========== =========== =========== =========== =========== ===========
|
|
|
|
|
|
|
|
CUSTOM_XML_PARSER(ThemeParser) {
|
|
|
|
XML_KEY(render_info)
|
|
|
|
XML_KEY(palette)
|
|
|
|
XML_KEY(color)
|
|
|
|
XML_PROP(name, true)
|
|
|
|
XML_PROP(rgb, true)
|
|
|
|
KEY_END()
|
|
|
|
KEY_END()
|
|
|
|
|
|
|
|
XML_KEY(fonts)
|
|
|
|
XML_KEY(font)
|
|
|
|
XML_PROP(id, true)
|
|
|
|
XML_PROP(type, true)
|
|
|
|
XML_PROP(color, true)
|
|
|
|
KEY_END()
|
|
|
|
KEY_END()
|
|
|
|
|
|
|
|
XML_KEY(defaults)
|
|
|
|
XML_PROP(stroke, false)
|
|
|
|
XML_PROP(shadow, false)
|
|
|
|
XML_PROP(factor, false)
|
|
|
|
XML_PROP(fg_color, false)
|
|
|
|
XML_PROP(bg_color, false)
|
|
|
|
XML_PROP(gradient_start, false)
|
|
|
|
XML_PROP(gradient_end, false)
|
|
|
|
XML_PROP(gradient_factor, false)
|
|
|
|
XML_PROP(fill, false)
|
|
|
|
KEY_END()
|
|
|
|
KEY_END()
|
|
|
|
} PARSER_END()
|
|
|
|
|
|
|
|
=========== =========== =========== =========== =========== ===========
|
|
|
|
|
|
|
|
The XML_KEY() macro takes a single argument, the name of the expected key.
|
|
|
|
Inside the scope of each key, you may define properties for the given key
|
2008-07-30 14:08:07 +00:00
|
|
|
with the XML_PROP() macro, which takes as parameters the name of the
|
|
|
|
property and whether it's optional or required. You might also define the
|
|
|
|
contained children keys, using the XML_KEY() macro again.
|
2008-07-30 13:33:32 +00:00
|
|
|
The scope of a XML key is closed with the KEY_END() macro.
|
|
|
|
|
2008-08-01 10:18:47 +00:00
|
|
|
Keys which may contain any kind of Property names may be defined with the
|
|
|
|
XML_PROP_ANY() macro instead of the XML_PROP() macro. This macro takes no
|
|
|
|
arguments.
|
|
|
|
|
2008-07-30 13:33:32 +00:00
|
|
|
As an example, the following XML layout:
|
|
|
|
|
|
|
|
XML_KEY(palette)
|
|
|
|
XML_KEY(color)
|
|
|
|
XML_PROP(name, true)
|
|
|
|
XML_PROP(rgb, true)
|
|
|
|
XML_PROP(optional_param, false)
|
|
|
|
KEY_END()
|
|
|
|
KEY_END()
|
|
|
|
|
|
|
|
will expect to parse a syntax like this:
|
|
|
|
|
|
|
|
<palette>
|
|
|
|
<color name = "red" rgb = "255, 0, 0" />
|
|
|
|
<color name = "blue" rgb = "0, 0, 255" optional_param = "565" />
|
|
|
|
</palette>
|
|
|
|
|
2008-07-30 14:08:07 +00:00
|
|
|
Once a layout has been defined, everytime a XML node (that is, a key and
|
|
|
|
all its properties) has been parsed, a specific callback funcion is called,
|
|
|
|
which should take care of managing the parsed data for the node.
|
2008-07-30 13:33:32 +00:00
|
|
|
|
2008-07-30 14:08:07 +00:00
|
|
|
Callback functions must be explicitly declared with the following syntax:
|
|
|
|
|
|
|
|
bool parserCallback_KEYNAME(ParserNode *node);
|
|
|
|
|
|
|
|
A callback function is needed for each key that can be parsed, since they
|
|
|
|
are called automatically; the function will receive a pointer to the XML
|
|
|
|
Node that has been parsed. This XML Node has the following properties:
|
|
|
|
|
|
|
|
- It's assured to be expected in the layout of the XML file (i.e.
|
|
|
|
has the proper position and depth in the XML tree).
|
|
|
|
|
|
|
|
- It's assured to contain all the required Properties that have
|
|
|
|
been declared in the XML layout.
|
|
|
|
|
|
|
|
- It's assured to contain NO unexpected properties (i.e. properties
|
|
|
|
which haven't been declared in the XML layout).
|
|
|
|
|
|
|
|
Further validation of the Node's data may be performed inside the callback
|
|
|
|
function. Once the node has been validated and its data has been parsed/
|
|
|
|
managed, the callback function is expected to return true.
|
|
|
|
|
|
|
|
If the data in the XML Node is corrupted or there was a problem when
|
|
|
|
parsing it, the callback function is expected to return false or,
|
|
|
|
preferably, to throw a parserError() using the following syntax:
|
|
|
|
|
|
|
|
return parserError("There was a problem in key '%s'.", arg1, ...);
|
|
|
|
|
|
|
|
Also, note that the XML parser doesn't take into account the actual order
|
|
|
|
of the keys and properties in the XML layout definition, only its layout
|
|
|
|
and relationships.
|
|
|
|
|
|
|
|
Lastly, when defining your own Custom XML Parser, further customization
|
|
|
|
may be accomplished _optionally_ by overloading several virtual functions
|
|
|
|
of the XMLParser class.
|
|
|
|
|
|
|
|
Check the API documentation of the following functions for more info:
|
|
|
|
|
|
|
|
virtual bool closedKeyCallback(ParserNode *node);
|
|
|
|
virtual bool skipComments();
|
|
|
|
virtual bool isValidNameChar(char c);
|
|
|
|
virtual void cleanup();
|
|
|
|
|
|
|
|
Check the sample implementation of the GUI::ThemeParser custom parser
|
|
|
|
for a working sample of a Custom XML Parser.
|
|
|
|
|
2008-07-30 13:33:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#define XML_KEY(keyName) {\
|
|
|
|
lay = new XMLKeyLayout; \
|
2008-08-01 10:18:47 +00:00
|
|
|
lay->anyProps = false; \
|
2008-07-30 13:33:32 +00:00
|
|
|
lay->custom = new kLocalParserName::CustomParserCallback; \
|
|
|
|
((kLocalParserName::CustomParserCallback*)(lay->custom))->callback = (&kLocalParserName::parserCallback_##keyName); \
|
|
|
|
layout.top()->children[#keyName] = lay; \
|
|
|
|
layout.push(lay);
|
|
|
|
|
|
|
|
#define KEY_END() layout.pop(); }
|
|
|
|
|
|
|
|
#define XML_PROP(propName, req) {\
|
|
|
|
prop.name = #propName; \
|
|
|
|
prop.required = req; \
|
|
|
|
layout.top()->properties.push_back(prop); }\
|
2008-08-01 10:18:47 +00:00
|
|
|
|
|
|
|
#define XML_PROP_ANY() {\
|
|
|
|
layout.top()->anyProps = true; }
|
2008-07-30 13:33:32 +00:00
|
|
|
|
|
|
|
#define CUSTOM_XML_PARSER(parserName) \
|
|
|
|
protected: \
|
|
|
|
typedef bool (parserName::*ParserCallback)(ParserNode *node); \
|
|
|
|
typedef parserName kLocalParserName; \
|
|
|
|
struct CustomParserCallback { ParserCallback callback; }; \
|
|
|
|
bool keyCallback(ParserNode *node) {return (this->*(((parserName::CustomParserCallback*)(node->layout->custom))->callback))(node);}\
|
|
|
|
virtual void buildLayout() { \
|
|
|
|
Common::Stack<XMLKeyLayout*> layout; \
|
|
|
|
XMLKeyLayout *lay = 0; \
|
|
|
|
XMLKeyLayout::XMLKeyProperty prop; \
|
|
|
|
_XMLkeys = new XMLKeyLayout; \
|
|
|
|
layout.push(_XMLkeys);
|
|
|
|
|
|
|
|
#define PARSER_END() layout.clear(); }
|
2008-06-18 23:49:47 +00:00
|
|
|
|
2008-06-25 11:34:58 +00:00
|
|
|
class XMLStream {
|
|
|
|
protected:
|
|
|
|
SeekableReadStream *_stream;
|
|
|
|
int _pos;
|
|
|
|
|
|
|
|
public:
|
|
|
|
XMLStream() : _stream(0), _pos(0) {}
|
|
|
|
|
|
|
|
~XMLStream() {
|
|
|
|
delete _stream;
|
|
|
|
}
|
|
|
|
|
|
|
|
SeekableReadStream *stream() {
|
|
|
|
return _stream;
|
|
|
|
}
|
|
|
|
|
2008-06-28 00:02:54 +00:00
|
|
|
char operator [](int idx) {
|
2008-06-25 11:34:58 +00:00
|
|
|
assert(_stream && idx >= 0);
|
|
|
|
|
|
|
|
if (_pos + 1 != idx)
|
|
|
|
_stream->seek(idx, SEEK_SET);
|
|
|
|
|
|
|
|
_pos = idx;
|
|
|
|
|
2008-07-03 19:42:04 +00:00
|
|
|
return _stream->readByte();
|
2008-06-25 11:34:58 +00:00
|
|
|
}
|
|
|
|
|
2008-06-25 18:11:17 +00:00
|
|
|
void loadStream(SeekableReadStream *s) {
|
2008-06-25 11:34:58 +00:00
|
|
|
delete _stream;
|
2008-06-25 18:11:17 +00:00
|
|
|
_stream = s;
|
2008-06-25 11:34:58 +00:00
|
|
|
}
|
2008-06-25 22:30:28 +00:00
|
|
|
|
|
|
|
bool ready() {
|
|
|
|
return _stream != 0;
|
|
|
|
}
|
2008-06-25 11:34:58 +00:00
|
|
|
};
|
|
|
|
|
2008-06-18 23:49:47 +00:00
|
|
|
/**
|
|
|
|
* The base XMLParser class implements generic functionality for parsing
|
|
|
|
* XML-like files.
|
|
|
|
*
|
|
|
|
* In order to use it, it must be inherited with a child class that implements
|
|
|
|
* the XMLParser::keyCallback() function.
|
|
|
|
*
|
|
|
|
* @see XMLParser::keyCallback()
|
|
|
|
*/
|
|
|
|
class XMLParser {
|
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Parser constructor.
|
|
|
|
*/
|
2008-07-30 13:33:32 +00:00
|
|
|
XMLParser() : _XMLkeys(0) {}
|
2008-06-18 23:49:47 +00:00
|
|
|
|
2008-06-25 14:19:56 +00:00
|
|
|
virtual ~XMLParser() {
|
|
|
|
while (!_activeKey.empty())
|
|
|
|
delete _activeKey.pop();
|
2008-07-30 14:08:07 +00:00
|
|
|
|
|
|
|
delete _XMLkeys;
|
2008-06-25 14:19:56 +00:00
|
|
|
}
|
2008-06-18 23:49:47 +00:00
|
|
|
|
|
|
|
/** Active state for the parser */
|
|
|
|
enum ParserState {
|
|
|
|
kParserNeedKey,
|
|
|
|
kParserNeedKeyName,
|
|
|
|
|
|
|
|
kParserNeedPropertyName,
|
|
|
|
kParserNeedPropertyOperator,
|
|
|
|
kParserNeedPropertyValue,
|
|
|
|
|
|
|
|
kParserError
|
|
|
|
};
|
2008-07-30 13:33:32 +00:00
|
|
|
|
|
|
|
struct XMLKeyLayout;
|
|
|
|
|
|
|
|
typedef Common::HashMap<Common::String, XMLParser::XMLKeyLayout*, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> ChildMap;
|
|
|
|
|
|
|
|
/** nested struct representing the layout of the XML file */
|
|
|
|
struct XMLKeyLayout {
|
|
|
|
void *custom;
|
|
|
|
struct XMLKeyProperty {
|
|
|
|
Common::String name;
|
|
|
|
bool required;
|
|
|
|
};
|
|
|
|
|
|
|
|
Common::List<XMLKeyProperty> properties;
|
2008-08-01 10:18:47 +00:00
|
|
|
bool anyProps;
|
2008-07-30 13:33:32 +00:00
|
|
|
ChildMap children;
|
2008-07-30 14:08:07 +00:00
|
|
|
|
|
|
|
~XMLKeyLayout() {
|
|
|
|
properties.clear();
|
|
|
|
children.clear();
|
|
|
|
// delete custom;
|
|
|
|
}
|
2008-07-30 13:33:32 +00:00
|
|
|
} *_XMLkeys;
|
2008-06-18 23:49:47 +00:00
|
|
|
|
|
|
|
/** Struct representing a parsed node */
|
|
|
|
struct ParserNode {
|
|
|
|
Common::String name;
|
|
|
|
Common::StringMap values;
|
2008-06-24 19:48:01 +00:00
|
|
|
bool ignore;
|
2008-06-25 17:56:00 +00:00
|
|
|
int depth;
|
2008-07-30 13:33:32 +00:00
|
|
|
XMLKeyLayout *layout;
|
2008-06-18 23:49:47 +00:00
|
|
|
};
|
|
|
|
|
2008-06-26 13:50:16 +00:00
|
|
|
/**
|
|
|
|
* Loads a file into the parser.
|
|
|
|
* Used for the loading of Theme Description files
|
|
|
|
* straight from the filesystem.
|
|
|
|
*
|
|
|
|
* @param filename Name of the file to load.
|
|
|
|
*/
|
2008-07-30 14:08:07 +00:00
|
|
|
bool loadFile(Common::String filename) {
|
2008-06-25 14:19:56 +00:00
|
|
|
Common::File *f = new Common::File;
|
|
|
|
|
Merged revisions 32701,32705,32727-32728,32730-32733,32737-32738,32742,32744-32745,32747,32750-32759,32762-32764,32769,32777,32783,32785-32786,32789-32791,32798-32799,32801-32807,32809-32812,32816-32817,32819-32821,32823-32830,32832-32836,32838-32844,32846-32850,32852-32854,32858-32859,32865-32868,32873-32874,32879,32883,32895,32899,32902-32904,32910-32912,32923-32924,32930-32931,32938,32940,32948-32949,32951,32960-32964,32966-32970,32972-32974,32976,32978,32983,32986-32990,32992,32994,33002-33004,33006-33007,33009-33010,33014,33017,33021-33023,33030,33033,33052-33053,33056-33058,33061-33064,33068,33070,33072,33075,33078-33079,33083,33086-33087,33089,33094-33096,33098-33099,33104,33108-33109,33114-33117,33120,33135-33146,33160,33162,33165,33167-33169,33188-33189,33191-33193,33196,33198,33202-33203,33206,33210,33212,33218-33220,33222,33224-33226,33229-33243,33246,33248-33250,33252,33258-33261,33263,33266,33270,33272-33283,33285,33287-33290,33295-33298,33321,33325-33330,33332-33335,33337-33340,33342,33345,33347,33349-33350,33352-33357,33359-33367,33369-33371,33373,33375-33377,33379-33380,33383-33385,33387-33389,33392-33394,33400-33402,33404-33405,33407-33410,33412-33416,33418-33419,33425-33427,33432,33436-33438,33444,33446,33452-33453,33455-33459,33463-33464,33466-33471,33473-33474,33478 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
................
r32701 | Tanoku | 2008-06-14 16:44:06 +0200 (Sat, 14 Jun 2008) | 1 line
Updated MS Visual Studio project files for MusicPlugin.
................
r32705 | sev | 2008-06-15 09:15:58 +0200 (Sun, 15 Jun 2008) | 2 lines
Make null plugin compilable
................
r32727 | thebluegr | 2008-06-17 20:27:03 +0200 (Tue, 17 Jun 2008) | 1 line
Removed duplicate code
................
r32728 | thebluegr | 2008-06-17 23:52:58 +0200 (Tue, 17 Jun 2008) | 1 line
Possible fix for bug #1979086 - "DRASCULA: Wrong language detection(?) and crash"
................
r32730 | buddha_ | 2008-06-18 05:31:13 +0200 (Wed, 18 Jun 2008) | 1 line
Fixed a small discrepancy in Delphine unpacker's command 00b's documentation (Parameter range is 1..8, not 1..9).
................
r32731 | john_doe | 2008-06-18 13:01:51 +0200 (Wed, 18 Jun 2008) | 4 lines
- Fixed sprite drawing in Rodney's Funscreen
- Handle mouse button up events and event number fixes in MadeEngine::handleEvents()
- Use milliseconds -> game ticks calculation based on Windows version of the original engine
- "Rodney's Fun Screen" -> "Rodney's Funscreen"
................
r32732 | fingolfin | 2008-06-18 21:46:50 +0200 (Wed, 18 Jun 2008) | 1 line
Setting svn:ignore for backends/fs/wii
................
r32733 | fingolfin | 2008-06-18 23:02:52 +0200 (Wed, 18 Jun 2008) | 1 line
Renamed M4Surface::empty() to clear() (two reason: empty is not a verb, and in class String it is used for a bool property)
................
r32737 | drmccoy | 2008-06-19 18:27:49 +0200 (Thu, 19 Jun 2008) | 2 lines
Only try playing object videos when the game version supports that (only Woodruff, for now)
................
r32738 | drmccoy | 2008-06-20 00:54:17 +0200 (Fri, 20 Jun 2008) | 2 lines
Fixed a palette issue in Lost in Time
................
r32742 | cpage88 | 2008-06-20 22:20:46 +0200 (Fri, 20 Jun 2008) | 117 lines
Merged revisions 31992,32088,32094,32129,32203,32208,32219,32236,32329,32332-32333,32357,32504,32519,32525,32566,32578,32641-32642,32673,32675,32677,32679-32680,32718-32719,32721,32739 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/branches/gsoc2008-rtl
........
r31992 | cpage88 | 2008-05-10 18:44:46 -0500 (Sat, 10 May 2008) | 1 line
Modified game loop to return to launcher, codeblocks layouts update 1.5->1.6
........
r32088 | cpage88 | 2008-05-13 11:09:57 -0500 (Tue, 13 May 2008) | 1 line
used memmove() instead of memcpy() to fix memory overlap error
........
r32094 | cpage88 | 2008-05-13 17:59:19 -0500 (Tue, 13 May 2008) | 1 line
Fixed memory leak by deallocating memory used by window->iconPtr
........
r32129 | cpage88 | 2008-05-14 18:26:32 -0500 (Wed, 14 May 2008) | 1 line
Fixed memory leak when returning to launcher in AGOS engine by properly creating and deleting midi driver pointer
........
r32203 | cpage88 | 2008-05-20 16:40:53 -0500 (Tue, 20 May 2008) | 1 line
AGOS Engine: Began implementation for a new quit event which will cleanly return to the launcher. This replaces the old shutdown() method within delay()
........
r32208 | cpage88 | 2008-05-21 13:52:27 -0500 (Wed, 21 May 2008) | 1 line
AGOS: Fixed two memory leaks when returning to the launcher (_mouseData and _zoneBuffers)
........
r32219 | cpage88 | 2008-05-22 18:40:36 -0500 (Thu, 22 May 2008) | 1 line
AGOS: Fixed a memory leak from earlier in a better way
........
r32236 | cpage88 | 2008-05-23 19:08:13 -0500 (Fri, 23 May 2008) | 1 line
AGI: Fixed two memory leaks when returning to launcher from AGI Engine
........
r32329 | cpage88 | 2008-05-27 15:15:36 -0500 (Tue, 27 May 2008) | 1 line
AGI: Modified AGI Engine to shutdown without using system->quit
........
r32332 | cpage88 | 2008-05-27 18:26:48 -0500 (Tue, 27 May 2008) | 1 line
CINE: Fixed two memory leaks when shutting down the CINE engine
........
r32333 | cpage88 | 2008-05-27 19:52:45 -0500 (Tue, 27 May 2008) | 1 line
CINE: Initialize exitEngine to 0 in mainLoop() to allow replay after returning to the launcher
........
r32357 | cpage88 | 2008-05-28 18:28:11 -0500 (Wed, 28 May 2008) | 1 line
LURE: Fixed some memory leaks when returning to the launcher from the LURE engine
........
r32504 | cpage88 | 2008-06-02 16:08:49 -0500 (Mon, 02 Jun 2008) | 1 line
PARA: Got rid of calls to system->quit() so that the Parallaction engine can return to the launcher. Also fixed a couple of memory leaks.
........
r32519 | cpage88 | 2008-06-03 13:24:54 -0500 (Tue, 03 Jun 2008) | 1 line
PARA: Fixed some memory leaks
........
r32525 | cpage88 | 2008-06-04 00:21:47 -0500 (Wed, 04 Jun 2008) | 1 line
QUEEN: Modified engine to use a quit flag instead of system->quit() in order to return to the launcher
........
r32566 | cpage88 | 2008-06-05 19:34:47 -0500 (Thu, 05 Jun 2008) | 1 line
TOUCHE: Fixed a memory leak
........
r32578 | cpage88 | 2008-06-06 11:40:39 -0500 (Fri, 06 Jun 2008) | 1 line
SKY: Fixed a memory leak in SKY engine
........
r32641 | cpage88 | 2008-06-09 17:26:05 -0500 (Mon, 09 Jun 2008) | 1 line
TOUCHE: Reverted some comments that were used for testing purposes
........
r32642 | cpage88 | 2008-06-09 18:15:17 -0500 (Mon, 09 Jun 2008) | 1 line
Implemented popAllCursors() in CursorManager to ensure that all unnecessary cursors are removed from the cursor stack when returning to the launcher
........
r32673 | cpage88 | 2008-06-12 11:58:02 -0500 (Thu, 12 Jun 2008) | 1 line
SAGA: Fixed memory leaks in the SAGA engine
........
r32675 | cpage88 | 2008-06-12 13:11:09 -0500 (Thu, 12 Jun 2008) | 1 line
LURE: Fixed memory leaks in the LURE engine
........
r32677 | cpage88 | 2008-06-12 13:52:43 -0500 (Thu, 12 Jun 2008) | 1 line
CINE: Fixed memory leaks in the CINE engine
........
r32679 | cpage88 | 2008-06-12 14:34:32 -0500 (Thu, 12 Jun 2008) | 1 line
AGOS: Fixed a memory leak in the AGOS engine
........
r32680 | cpage88 | 2008-06-12 14:43:54 -0500 (Thu, 12 Jun 2008) | 1 line
SCUMM: Fixed a memory leak in the SCUMM engine
........
r32718 | cpage88 | 2008-06-16 12:34:58 -0500 (Mon, 16 Jun 2008) | 1 line
AGOS: Found a system->quit(), changed to _quit=true
........
r32719 | cpage88 | 2008-06-16 13:47:32 -0500 (Mon, 16 Jun 2008) | 1 line
Fixed a problem where the function that I previously implemented, popAllCursors(), was causing the mouse cursor to disapear
........
r32721 | cpage88 | 2008-06-16 14:55:59 -0500 (Mon, 16 Jun 2008) | 1 line
Cleaned up some unnecessary comments
........
r32739 | cpage88 | 2008-06-20 14:38:38 -0500 (Fri, 20 Jun 2008) | 1 line
Reverting changes to codeblocks layouts made in revision 31992
........
................
r32744 | peres001 | 2008-06-22 07:42:22 +0200 (Sun, 22 Jun 2008) | 1 line
Circular references between Zone/Animation and Command are now manually removed, to allow the objects - which are stored into SharedPtr's - to be deallocated.
................
r32745 | fingolfin | 2008-06-22 12:26:18 +0200 (Sun, 22 Jun 2008) | 1 line
Disabled return to launcher on trunk again
................
r32747 | thebluegr | 2008-06-22 12:29:36 +0200 (Sun, 22 Jun 2008) | 1 line
Updated NEWS about Drascula support
................
r32750 | athrxx | 2008-06-22 14:31:05 +0200 (Sun, 22 Jun 2008) | 1 line
this should fix bug #1997149: KYRA2: no text in spellbook
................
r32751 | lordhoto | 2008-06-22 14:36:38 +0200 (Sun, 22 Jun 2008) | 2 lines
Cleanup.
................
r32752 | lordhoto | 2008-06-22 14:39:40 +0200 (Sun, 22 Jun 2008) | 2 lines
Update comment.
................
r32753 | athrxx | 2008-06-22 14:41:46 +0200 (Sun, 22 Jun 2008) | 1 line
missed this in last commit (bug fix for #1997149)
................
r32754 | lordhoto | 2008-06-22 14:43:32 +0200 (Sun, 22 Jun 2008) | 2 lines
Cleanup.
................
r32755 | lordhoto | 2008-06-22 15:26:22 +0200 (Sun, 22 Jun 2008) | 2 lines
Fixed getTotalPlayTime implementation for MP3InputStream.
................
r32756 | peres001 | 2008-06-22 16:31:45 +0200 (Sun, 22 Jun 2008) | 1 line
Fixed leak when loading sounds for Amiga version of Nippon Safes.
................
r32757 | peres001 | 2008-06-22 16:46:08 +0200 (Sun, 22 Jun 2008) | 1 line
Added constructor and destructor to Dialogue, thus fixing a long standing leak.
................
r32758 | thebluegr | 2008-06-22 19:36:14 +0200 (Sun, 22 Jun 2008) | 1 line
Fixed 2 MSVC warnings (potentially undefined behavior and possibly uninitialized variable used)
................
r32759 | thebluegr | 2008-06-22 19:57:06 +0200 (Sun, 22 Jun 2008) | 1 line
Turned off overzealous warning 4800 - "forcing value to bool 'true' or 'false' (performance warning)"
................
r32762 | peres001 | 2008-06-24 15:21:22 +0200 (Tue, 24 Jun 2008) | 1 line
Fix for bug #2001193. Character confirmation screen didn't appear and game crashed because too many strings were added to the draw list.
................
r32763 | lordhoto | 2008-06-24 15:59:48 +0200 (Tue, 24 Jun 2008) | 2 lines
Added const to some static data.
................
r32764 | jvprat | 2008-06-24 16:23:26 +0200 (Tue, 24 Jun 2008) | 2 lines
Fixed mktemp usage in BSD systems (as noted in bug #2000931)
................
r32769 | buddha_ | 2008-06-24 22:44:37 +0200 (Tue, 24 Jun 2008) | 7 lines
Fixed opcodes:
- 0xA0: o2_addGfxElementType20 (Was o2_addGfxElementA0)
Implemented opcodes:
- 0xA1: o2_removeGfxElementType20 (Was o2_removeGfxElementA0)
- 0xA2: o2_addGfxElementType21 (Was o2_opA2)
- 0xA3: o2_removeGfxElementType21 (Was o2_opA3)
NOTE: Drawing of type 21 overlay elements isn't coded yet.
................
r32777 | thebluegr | 2008-06-25 10:36:07 +0200 (Wed, 25 Jun 2008) | 1 line
Possible fix for (for the drascula engine) for bug #2001583 - "WINCE: CRUISE and DRASCULA engines can not be compiled"
................
r32783 | thebluegr | 2008-06-25 14:02:34 +0200 (Wed, 25 Jun 2008) | 1 line
Added patch from bug report #2001189 - "DRASCULA: Wrong intro music in Spanish version"
................
r32785 | buddha_ | 2008-06-25 17:09:24 +0200 (Wed, 25 Jun 2008) | 5 lines
Implemented opcode:
- 0x8D: o2_op8D (Didn't come up with a descriptive name yet)
Compares ranges of x, y and mask parameters between two objects.
Possibly some kind of an intersection testing function?
................
r32786 | buddha_ | 2008-06-25 19:14:44 +0200 (Wed, 25 Jun 2008) | 4 lines
Implemented opcode:
- 0x82: o2_modifySeqListElement (Was o2_op82)
Seeks a matching element from the seqList and modifies its values.
................
r32789 | buddha_ | 2008-06-25 20:51:44 +0200 (Wed, 25 Jun 2008) | 1 line
Added FIXME about the broken implementation of opcode 0x9A (o2_wasZoneChecked).
................
r32790 | buddha_ | 2008-06-25 23:57:08 +0200 (Wed, 25 Jun 2008) | 5 lines
Implemented support for zoneQuery (Operation Stealth specific).
Fixed opcodes (related to zoneQuery):
- 0x08: o1_checkCollision
- 0x9A: o2_wasZoneChecked
NOTE: Savegame support for the zoneQuery data is broken
................
r32791 | buddha_ | 2008-06-26 00:13:18 +0200 (Thu, 26 Jun 2008) | 1 line
Fix for GCC warning (Warned about testing x >= 0 when x is unsigned and therefore the test is always true).
................
r32798 | cyx | 2008-06-26 12:12:12 +0200 (Thu, 26 Jun 2008) | 1 line
moved midi driver object creation to MidiPlayer class (to match delete call)
................
r32799 | cyx | 2008-06-26 12:12:47 +0200 (Thu, 26 Jun 2008) | 1 line
fix possible oob access
................
r32801 | buddha_ | 2008-06-26 17:16:15 +0200 (Thu, 26 Jun 2008) | 1 line
Comments update.
................
r32802 | buddha_ | 2008-06-26 17:44:26 +0200 (Thu, 26 Jun 2008) | 1 line
Comments update.
................
r32803 | anotherguest | 2008-06-26 18:51:02 +0200 (Thu, 26 Jun 2008) | 1 line
Fixed Symbian buildsystem for new defines. Fixed ARM asm syntax for Symbian build.
................
r32804 | buddha_ | 2008-06-26 19:29:21 +0200 (Thu, 26 Jun 2008) | 4 lines
Fixed opcode:
- 0x83: o2_isSeqRunning (Should it be named o2_isSeqNotRunning?)
-- Added previously missing test part
-- Negated the result (It was backwards before!)
................
r32805 | anotherguest | 2008-06-26 20:31:33 +0200 (Thu, 26 Jun 2008) | 1 line
Changed default paths
................
r32806 | anotherguest | 2008-06-26 20:45:46 +0200 (Thu, 26 Jun 2008) | 1 line
Remove inclusion of .o in mmp.in
................
r32807 | athrxx | 2008-06-26 21:42:59 +0200 (Thu, 26 Jun 2008) | 3 lines
- improved hof music support for fm-towns (driver for *.twn tracks) (still needs quite some work)
- some PC-98 music support since it uses a very similar driver, but this can't be considered working yet)
- Kyra 1 PC-98 music doen't work at all since I haven't figured out yet how to turn track numbers into the corresponding music file names (might require a hard coded track map)
................
r32809 | drmccoy | 2008-06-26 21:56:18 +0200 (Thu, 26 Jun 2008) | 2 lines
Fixing compilation for me. There are still lots of "cast casts away constness" warnings, though
................
r32810 | athrxx | 2008-06-26 22:13:04 +0200 (Thu, 26 Jun 2008) | 1 line
cleanup
................
r32811 | athrxx | 2008-06-26 22:30:43 +0200 (Thu, 26 Jun 2008) | 1 line
more cleanup
................
r32812 | athrxx | 2008-06-26 22:43:23 +0200 (Thu, 26 Jun 2008) | 1 line
fix bad const casts
................
r32816 | buddha_ | 2008-06-27 01:30:45 +0200 (Fri, 27 Jun 2008) | 1 line
Implemented Operation Stealth's version of addOverlay(objectIndex, overlayType).
................
r32817 | john_doe | 2008-06-27 11:57:38 +0200 (Fri, 27 Jun 2008) | 2 lines
- Fixed umlauts in printText
- Don't exit when a pmv video couldn't be found
................
r32819 | athrxx | 2008-06-28 15:13:37 +0200 (Sat, 28 Jun 2008) | 2 lines
- HOF: bug fix for music driver
- KYRA1 PC98: fix music file selection
................
r32820 | peres001 | 2008-06-28 15:31:58 +0200 (Sat, 28 Jun 2008) | 1 line
Added comment for fix for bug #2001193.
................
r32821 | athrxx | 2008-06-28 15:40:03 +0200 (Sat, 28 Jun 2008) | 1 line
hof: remove debug code
................
r32823 | joostp | 2008-06-28 15:53:39 +0200 (Sat, 28 Jun 2008) | 2 lines
add getFilesystemFactory() method to null backend
................
r32824 | fingolfin | 2008-06-28 16:14:16 +0200 (Sat, 28 Jun 2008) | 1 line
Removed OSystem::getFilesystemFactory() default implentation, as announced
................
r32825 | fingolfin | 2008-06-28 17:00:27 +0200 (Sat, 28 Jun 2008) | 1 line
Removed dead X11 backend
................
r32826 | fingolfin | 2008-06-28 17:13:54 +0200 (Sat, 28 Jun 2008) | 1 line
Removed obsolete ::clearSoundCallback() code
................
r32827 | fingolfin | 2008-06-28 17:27:40 +0200 (Sat, 28 Jun 2008) | 1 line
Doxygenified a comment
................
r32828 | fingolfin | 2008-06-28 17:28:29 +0200 (Sat, 28 Jun 2008) | 1 line
Patch ##1956946 (Audio::Mixer internal API revision) with some tweaks
................
r32829 | athrxx | 2008-06-28 17:36:50 +0200 (Sat, 28 Jun 2008) | 1 line
- implement music fading for Hof FM-Towns
................
r32830 | eriktorbjorn | 2008-06-28 18:00:04 +0200 (Sat, 28 Jun 2008) | 2 lines
Fixed warning. (Hopefully without breaking anything.)
................
r32832 | marcus_c | 2008-06-29 00:16:51 +0200 (Sun, 29 Jun 2008) | 1 line
Set $(DEPDIR).
................
r32833 | peres001 | 2008-06-29 11:30:32 +0200 (Sun, 29 Jun 2008) | 1 line
Changed all remaining code to use the GfxObj class to keep frames data. This allows for more uniform processing during rendering, and also fixes the display of dialogue faces for BRA.
................
r32834 | peres001 | 2008-06-29 11:56:44 +0200 (Sun, 29 Jun 2008) | 1 line
Merged the three render lists (for animations, doors and objects) into a single one.
................
r32835 | djwillis | 2008-06-29 12:16:20 +0200 (Sun, 29 Jun 2008) | 1 line
Small GP2X tidy (mostly svn:executable on scripts) and fixes needed to reflect "Patch ##1956946 (Audio::Mixer internal API revision)"
................
r32836 | marcus_c | 2008-06-29 13:51:47 +0200 (Sun, 29 Jun 2008) | 1 line
New Mixer API.
................
r32838 | marcus_c | 2008-06-29 14:10:38 +0200 (Sun, 29 Jun 2008) | 1 line
Updated to use new EngineMan.detectGames() API.
................
r32839 | knakos | 2008-06-29 16:40:41 +0200 (Sun, 29 Jun 2008) | 1 line
finish up new mixer changes
................
r32840 | knakos | 2008-06-29 16:41:44 +0200 (Sun, 29 Jun 2008) | 1 line
fix some quirks of the newer build system
................
r32841 | athrxx | 2008-06-29 17:25:45 +0200 (Sun, 29 Jun 2008) | 2 lines
- some more work on the Hof FM-Towns/PC98 music driver
- move channels to a separate class
................
r32842 | athrxx | 2008-06-29 17:59:35 +0200 (Sun, 29 Jun 2008) | 1 line
cleanup
................
r32843 | athrxx | 2008-06-29 18:07:29 +0200 (Sun, 29 Jun 2008) | 1 line
fix warning
................
r32844 | knakos | 2008-06-29 18:58:27 +0200 (Sun, 29 Jun 2008) | 1 line
adding a fixme
................
r32846 | joostp | 2008-06-30 01:36:44 +0200 (Mon, 30 Jun 2008) | 2 lines
changes required for new mixer API + implement getMillis() and delayMillis() using gettimeofday() and usleep() resp.
................
r32847 | peres001 | 2008-06-30 03:36:50 +0200 (Mon, 30 Jun 2008) | 1 line
Small cleanup/shuffling of Gfx code.
................
r32848 | buddha_ | 2008-06-30 05:33:08 +0200 (Mon, 30 Jun 2008) | 1 line
Implemented resetGfxEntityEntry and made it used where appropriate (The function wasn't very easy to reverse engineer so it may have flaws still, but let's hope it doesn't ;-)).
................
r32849 | thebluegr | 2008-06-30 10:46:20 +0200 (Mon, 30 Jun 2008) | 1 line
Updated MSVC project files for commit #32828
................
r32850 | buddha_ | 2008-06-30 19:24:23 +0200 (Mon, 30 Jun 2008) | 1 line
Fixed addAni (A test before using resetGfxEntityEntry was incorrect). Also added comments and checked that most 8-bit values used in this function are used as signed integers.
................
r32852 | buddha_ | 2008-06-30 20:15:34 +0200 (Mon, 30 Jun 2008) | 1 line
Removed TODO from checkCollision: Updating zoneQuery each time checkCollision is called seems to be fine.
................
r32853 | anotherguest | 2008-06-30 21:10:32 +0200 (Mon, 30 Jun 2008) | 1 line
del instead of rm command
................
r32854 | athrxx | 2008-06-30 23:55:08 +0200 (Mon, 30 Jun 2008) | 2 lines
- this fixes Hof PC98 music initialization
- music sounds exactly like FM-Towns for now
................
r32858 | lordhoto | 2008-07-01 01:39:56 +0200 (Tue, 01 Jul 2008) | 2 lines
Added support for Spanish fan translation of kyra3 (See fr #1994040 "KYRA3: Add support for Spanish fan translation").
................
r32859 | lordhoto | 2008-07-01 01:44:33 +0200 (Tue, 01 Jul 2008) | 2 lines
Fix game flags for detection entries of installed kyra3 versions.
................
r32865 | fingolfin | 2008-07-01 12:33:25 +0200 (Tue, 01 Jul 2008) | 1 line
Fixed unitialized variables
................
r32866 | dreammaster | 2008-07-01 13:46:29 +0200 (Tue, 01 Jul 2008) | 1 line
Made corrections to the Italian strings
................
r32867 | dreammaster | 2008-07-01 13:48:06 +0200 (Tue, 01 Jul 2008) | 1 line
New lure.dat with corrections to the Italian strings
................
r32868 | fingolfin | 2008-07-01 16:51:44 +0200 (Tue, 01 Jul 2008) | 1 line
Reverted accidental commit of Tinsel changes in engines.mk
................
r32873 | peres001 | 2008-07-02 03:41:08 +0200 (Wed, 02 Jul 2008) | 2 lines
- Changed labels to be GfxObj's, thus removing the Label object altogether.
- Changed Item's to be almost GfxObj's, since ownership and destruction of underlying resource is an issue here (got to think some more about it).
................
r32874 | buddha_ | 2008-07-02 06:31:50 +0200 (Wed, 02 Jul 2008) | 5 lines
Fully implemented processSeqListElement
- Added parts that were missing and fixed a couple of errors
-- One test was backwards and a global variable was written to when it shouldn't have been
Added global variable inputVar0 that's used in processSeqListElement
NOTE: inputVar0 isn't updated anywhere yet, so that's a TODO
................
r32879 | sev | 2008-07-03 10:44:29 +0200 (Thu, 03 Jul 2008) | 1 line
Fix for bug #2008054: Parallaction engine doesn't compile under MSVC9
................
r32883 | peres001 | 2008-07-03 12:31:25 +0200 (Thu, 03 Jul 2008) | 1 line
Changed balloons to use GfxObj as well. Next step is to integrate balloons for BRA.
................
r32895 | drmccoy | 2008-07-03 18:25:59 +0200 (Thu, 03 Jul 2008) | 2 lines
Fixing a crash when loading a save made within the cult/bargon building (bug #2005965)
................
r32899 | athrxx | 2008-07-03 23:09:07 +0200 (Thu, 03 Jul 2008) | 1 line
minor fix for Towns/PC98 music
................
r32902 | peres001 | 2008-07-04 02:29:21 +0200 (Fri, 04 Jul 2008) | 2 lines
- Moved dialogue balloon management code from Gfx to its own class
- Added a class to draw balloons in BRA (still without text and with wrong placement)
................
r32903 | Kirben | 2008-07-04 02:35:39 +0200 (Fri, 04 Jul 2008) | 1 line
Correct typo.
................
r32904 | buddha_ | 2008-07-04 11:38:03 +0200 (Fri, 04 Jul 2008) | 1 line
Updated MSVC project files (Added Parallaction's balloons.cpp).
................
r32910 | sev | 2008-07-05 06:28:17 +0200 (Sat, 05 Jul 2008) | 2 lines
Mention merge of Chris Page's memory leak plugging code.
................
r32911 | lordhoto | 2008-07-05 09:47:27 +0200 (Sat, 05 Jul 2008) | 2 lines
Added spanish menu strings for spanish fan translation of Kyrandia 3.
................
r32912 | lordhoto | 2008-07-05 10:20:10 +0200 (Sat, 05 Jul 2008) | 2 lines
Added support for Italian fan translation of Kyrandia 3. (see fr#2003504 "KYRA: add support for Italian version of Kyrandia 2&3")
................
r32923 | marcus_c | 2008-07-06 00:53:17 +0200 (Sun, 06 Jul 2008) | 1 line
Enable all engines.
................
r32924 | dhewg | 2008-07-06 14:04:19 +0200 (Sun, 06 Jul 2008) | 1 line
adjustments to the recent mixer api changes
................
r32930 | eriktorbjorn | 2008-07-06 20:37:52 +0200 (Sun, 06 Jul 2008) | 4 lines
Implemented Good Enough(TM) XMIDI looping. This is used by Kyrandia 2 (the
loop hack is no longer needed, and has been removed), and will be used by
Discworld.
................
r32931 | eriktorbjorn | 2008-07-06 21:25:32 +0200 (Sun, 06 Jul 2008) | 4 lines
Fixed silly error. The NEXT_BREAK event should, of course, jump to the event
*after* the FOR_LOOP event. Apart from simplifying things, this should allow
limited number of repeats to work.
................
r32938 | drmccoy | 2008-07-07 15:01:54 +0200 (Mon, 07 Jul 2008) | 2 lines
Don't let listSavefiles() search subdirectories. Files with the same name (in different directories) would cause duplicate entries for the same file.
................
r32940 | peres001 | 2008-07-07 16:51:27 +0200 (Mon, 07 Jul 2008) | 1 line
Fixed regression after label code refactoring.
................
r32948 | thebluegr | 2008-07-07 21:40:43 +0200 (Mon, 07 Jul 2008) | 1 line
Some fixes for warnings under GCC 2.95
................
r32949 | lordhoto | 2008-07-07 22:40:35 +0200 (Mon, 07 Jul 2008) | 1 line
Fix for bug #2012293 "KYRA: Bad Spanish String in menu".
................
r32951 | buddha_ | 2008-07-08 00:02:01 +0200 (Tue, 08 Jul 2008) | 1 line
Fix for bathroom door opening crash in Operation Stealth's start.
................
r32960 | fingolfin | 2008-07-08 12:29:35 +0200 (Tue, 08 Jul 2008) | 1 line
Remove reference to kPlainSoundType
................
r32961 | sev | 2008-07-08 13:18:44 +0200 (Tue, 08 Jul 2008) | 1 line
Shut couple of MSVC warnings
................
r32962 | drmccoy | 2008-07-08 13:35:09 +0200 (Tue, 08 Jul 2008) | 2 lines
Modified the EGA story image delay to work for the Mac versions as well
................
r32963 | drmccoy | 2008-07-08 13:36:52 +0200 (Tue, 08 Jul 2008) | 3 lines
Added a Gob1 version supplied by raina in the forums.
It does look like the Mac version with a DOS executable and stripped music to me, so let's hope the Mac level image workaround works there as well.
................
r32964 | sev | 2008-07-08 13:48:16 +0200 (Tue, 08 Jul 2008) | 1 line
One more MSVC warning
................
r32966 | eriktorbjorn | 2008-07-08 18:25:39 +0200 (Tue, 08 Jul 2008) | 4 lines
On reading some more about XMIDI, I believe the NEXT and BREAK variants of the
controller are mutually exclusive cases, i.e. a BREAK simply means forget about
the innermost loop, and continue as if nothing had happened.
................
r32967 | joostp | 2008-07-08 19:20:26 +0200 (Tue, 08 Jul 2008) | 2 lines
changes for new Mixer API
................
r32968 | joostp | 2008-07-08 19:41:09 +0200 (Tue, 08 Jul 2008) | 2 lines
Enable static engines -- time to start thinking about prx/plugin support!
................
r32969 | joostp | 2008-07-08 19:46:26 +0200 (Tue, 08 Jul 2008) | 2 lines
set DEPDIR
................
r32970 | tramboi | 2008-07-09 04:19:57 +0200 (Wed, 09 Jul 2008) | 3 lines
New configure flag --enable-profiling to compile and link with -pg (for
gprof)
................
r32972 | peres001 | 2008-07-09 04:49:20 +0200 (Wed, 09 Jul 2008) | 1 line
Added a couple of NULLity checks.
................
r32973 | fingolfin | 2008-07-09 12:42:47 +0200 (Wed, 09 Jul 2008) | 1 line
cleanup / code formatting
................
r32974 | peres001 | 2008-07-09 12:52:46 +0200 (Wed, 09 Jul 2008) | 1 line
Fixed regression introduced with GfxObj: the character sprite was sometimes removed from the rendering list.
................
r32976 | peres001 | 2008-07-09 15:27:09 +0200 (Wed, 09 Jul 2008) | 1 line
Fixed leaks in NS and BRA.
................
r32978 | agent-q | 2008-07-09 18:50:23 +0200 (Wed, 09 Jul 2008) | 1 line
DS: Backend changes for new mixer code
................
r32983 | peres001 | 2008-07-10 04:00:54 +0200 (Thu, 10 Jul 2008) | 1 line
Fixed destruction of sprites in BRA.
................
r32986 | lordhoto | 2008-07-10 13:25:43 +0200 (Thu, 10 Jul 2008) | 2 lines
Workaround for gcc 2.95 compiler bug.
................
r32987 | lordhoto | 2008-07-10 13:28:51 +0200 (Thu, 10 Jul 2008) | 2 lines
Fixed mem leak in MIDI related code.
................
r32988 | lordhoto | 2008-07-10 14:05:38 +0200 (Thu, 10 Jul 2008) | 2 lines
Added filename to unknown opcode/command warnings of EMC scripts.
................
r32989 | lordhoto | 2008-07-10 14:12:42 +0200 (Thu, 10 Jul 2008) | 2 lines
Added filename to unkown command/opcode warnings for TIM scripts.
................
r32990 | lordhoto | 2008-07-10 14:14:00 +0200 (Thu, 10 Jul 2008) | 2 lines
Typo.
................
r32992 | eriktorbjorn | 2008-07-10 18:19:17 +0200 (Thu, 10 Jul 2008) | 2 lines
Fixed Kyra 3 detection regression.
................
r32994 | tramboi | 2008-07-10 20:01:54 +0200 (Thu, 10 Jul 2008) | 1 line
Fixed a few warnings
................
r33002 | peres001 | 2008-07-11 14:55:08 +0200 (Fri, 11 Jul 2008) | 2 lines
Fixed leak in sound code by explicitly deleting the midi driver.
................
r33003 | peres001 | 2008-07-11 15:06:28 +0200 (Fri, 11 Jul 2008) | 3 lines
Moved program and command execution code out of the engine, into their own brand new
classes.
................
r33004 | buddha_ | 2008-07-11 15:13:28 +0200 (Fri, 11 Jul 2008) | 1 line
Update MSVC project files.
................
r33006 | peres001 | 2008-07-11 15:36:22 +0200 (Fri, 11 Jul 2008) | 1 line
Cleanup.
................
r33007 | peres001 | 2008-07-11 17:07:13 +0200 (Fri, 11 Jul 2008) | 1 line
Added a script (courtesy of salty-horse) to create/set properties for source files under version control by Subversion. Specifically, the mime-type, eol-style and keywords properties are handled.
................
r33009 | fingolfin | 2008-07-11 22:28:14 +0200 (Fri, 11 Jul 2008) | 1 line
Don't use kPlainSoundType if you don't have to
................
r33010 | fingolfin | 2008-07-11 22:28:50 +0200 (Fri, 11 Jul 2008) | 1 line
cleanup
................
r33014 | drmccoy | 2008-07-12 17:21:38 +0200 (Sat, 12 Jul 2008) | 3 lines
Changed tricky variable access from pointers to a new class that minds endianess.
This should fix a few regressions with BE games on LE systems and vice versa that I introduced when I changed how variables are stored (which was necessary to get Woodruff work on BE systems).
................
r33017 | tramboi | 2008-07-12 22:35:44 +0200 (Sat, 12 Jul 2008) | 2 lines
Minor constness fix to help with aliasing
................
r33021 | peres001 | 2008-07-13 05:30:14 +0200 (Sun, 13 Jul 2008) | 1 line
Properly implemented the OFF command. The new rendering order for graphics let this mistake finally surface.
................
r33022 | peres001 | 2008-07-13 05:39:42 +0200 (Sun, 13 Jul 2008) | 1 line
Cleanup and improved debugging output for CommandExec::run()
................
r33023 | peres001 | 2008-07-13 08:27:31 +0200 (Sun, 13 Jul 2008) | 1 line
Cleanup of walk code.
................
r33030 | athrxx | 2008-07-13 14:20:24 +0200 (Sun, 13 Jul 2008) | 1 line
- fix for bug #2016965: KYRA: does not compile in MSVC71
................
r33033 | peres001 | 2008-07-13 15:04:36 +0200 (Sun, 13 Jul 2008) | 1 line
More refactoring of walk code.
................
r33052 | peres001 | 2008-07-14 02:13:31 +0200 (Mon, 14 Jul 2008) | 1 line
Made sure characters are not removed from the rendering list during switches.
................
r33053 | peres001 | 2008-07-14 02:21:05 +0200 (Mon, 14 Jul 2008) | 1 line
Fixed regression in walk code. Now standing frames are correctly selected when the character encounters an unexpected blocking object in his/her path.
................
r33056 | fingolfin | 2008-07-14 09:54:18 +0200 (Mon, 14 Jul 2008) | 1 line
Fixed code formatting
................
r33057 | dreammaster | 2008-07-14 12:33:57 +0200 (Mon, 14 Jul 2008) | 1 line
Fix for missing data in the savegame format that could result in not being able to talk to Goewin in the apothecary after restoring a savegame
................
r33058 | peres001 | 2008-07-14 15:35:43 +0200 (Mon, 14 Jul 2008) | 1 line
Removed all labels from the rendering list to avoid random crashes after introduction is over.
................
r33061 | fingolfin | 2008-07-14 21:14:26 +0200 (Mon, 14 Jul 2008) | 1 line
cleanup (and test for Marwan's branch.... ;)
................
r33062 | tramboi | 2008-07-14 22:34:31 +0200 (Mon, 14 Jul 2008) | 1 line
Register spilling avoided in AGOS background drawing (and 2x unrolling)
................
r33063 | wjpalenstijn | 2008-07-14 23:00:39 +0200 (Mon, 14 Jul 2008) | 1 line
Don't draw scumm saveload dialog while reflowing layout, as that would use uninitialized values
................
r33064 | wjpalenstijn | 2008-07-14 23:04:42 +0200 (Mon, 14 Jul 2008) | 1 line
remove accidentally committed debugging code; fix shadowing warning
................
r33068 | buddha_ | 2008-07-15 01:10:51 +0200 (Tue, 15 Jul 2008) | 8 lines
Fix for bug #2016647 (FW: crash with italian amiga version).
- Consists of a workaround for a script bug that used local
variable 251 when it should've used global variable 251.
- Also added a fix for a crash when failing copy protection
in Amiga or Atari ST versions of Future Wars.
NOTE: That any of the Amiga or Atari ST versions of Future Wars
haven't crashed right in the beginning before seems like plain
luck because accessing local variable 251 is out of bounds!
................
r33070 | fingolfin | 2008-07-15 12:47:24 +0200 (Tue, 15 Jul 2008) | 1 line
config.log and tmp files should be put into the configure (= current) dir, not the source dir
................
r33072 | peres001 | 2008-07-15 12:59:58 +0200 (Tue, 15 Jul 2008) | 1 line
Made frame unpacking buffer dynamic (this frees some BSS space).
................
r33075 | fingolfin | 2008-07-15 19:13:06 +0200 (Tue, 15 Jul 2008) | 1 line
Implemented audio double buffering (for now OSX only)
................
r33078 | cyx | 2008-07-15 22:26:12 +0200 (Tue, 15 Jul 2008) | 1 line
fix bug #1995042: stop previous sfx playback when starting a new sfx (matches original dos code). Also removed the "sound skipping" hack in final bam scene.
................
r33079 | cyx | 2008-07-15 22:31:11 +0200 (Tue, 15 Jul 2008) | 2 lines
fix bug #1876741: changed .SB playback rate to 11840Hz (matches dos game)
................
r33083 | tramboi | 2008-07-16 11:08:44 +0200 (Wed, 16 Jul 2008) | 3 lines
Split the drawVertImage function in the agos engine to make it clearer
and easier to profile
................
r33086 | peres001 | 2008-07-17 02:38:11 +0200 (Thu, 17 Jul 2008) | 1 line
Fixed regression bug in dialogue, which de-facto allowed user to skip in-game protection.
................
r33087 | buddha_ | 2008-07-17 09:13:41 +0200 (Thu, 17 Jul 2008) | 1 line
Patch #2019455: Patch for reducing the BSS size of Cine engine.
................
r33089 | fingolfin | 2008-07-17 17:56:24 +0200 (Thu, 17 Jul 2008) | 1 line
Committing PS2 changes on behalf of the other Max ;)
................
r33094 | eriktorbjorn | 2008-07-18 06:16:00 +0200 (Fri, 18 Jul 2008) | 4 lines
Don't crash if you try to use music file #2 as music file #1. When the music
wasn't found, it would close the file even if something else was already
playing from it. (Some music is in both files.)
................
r33095 | dreammaster | 2008-07-18 11:36:49 +0200 (Fri, 18 Jul 2008) | 2 lines
In OSystem_SDL::closeMixer moved the call to SDL_CloseAudio to before the deletion of the _mixer variable in to fix an assert that was being generated in OSystem_SDL::mixCallback
................
r33096 | buddha_ | 2008-07-18 16:01:53 +0200 (Fri, 18 Jul 2008) | 1 line
Added savefile position comments to savegame loading routine (Helpful for debugging the formats).
................
r33098 | anotherguest | 2008-07-18 21:02:40 +0200 (Fri, 18 Jul 2008) | 1 line
Symbian soundsmixer update. (Compile fix)
................
r33099 | anotherguest | 2008-07-18 22:40:48 +0200 (Fri, 18 Jul 2008) | 1 line
Introduced cache for filereading to fix slowness in AGOS among others.
................
r33104 | anotherguest | 2008-07-19 00:07:52 +0200 (Sat, 19 Jul 2008) | 1 line
Fixed typo in filehandling
................
r33108 | anotherguest | 2008-07-19 09:08:37 +0200 (Sat, 19 Jul 2008) | 1 line
eof was not working properly with caching
................
r33109 | anotherguest | 2008-07-19 09:44:12 +0200 (Sat, 19 Jul 2008) | 1 line
Enable support to turn off ALL variations. all variation is most often the one used
................
r33114 | fingolfin | 2008-07-19 23:42:31 +0200 (Sat, 19 Jul 2008) | 1 line
Removed -Wundef from the default list of compiler flags, and changed PLUGIN_ENABLED_DYNAMIC to not use 'defined()', thus avoiding compiler problems on e.g. BeOS
................
r33115 | sunmax | 2008-07-20 03:30:47 +0200 (Sun, 20 Jul 2008) | 9 lines
1. Re-added "rpckbd" as in 0.11.0
2. Committed only its source, you will need to do a make inside its folder
before being able to compile our beloved PlayStation2 backend.
Enjoy,
-max
................
r33116 | sunmax | 2008-07-20 03:40:08 +0200 (Sun, 20 Jul 2008) | 4 lines
Added the empty "elf" folder for the PS2 scummvm binary,
so that developers won't have to mkdir it by hand.
................
r33117 | sunmax | 2008-07-20 03:44:40 +0200 (Sun, 20 Jul 2008) | 5 lines
Added "DEPDIR := .deps" in Makefile.ps2
Thanks Max [the other one] for pointing it out!
................
r33120 | knakos | 2008-07-20 13:15:29 +0200 (Sun, 20 Jul 2008) | 1 line
workaround for bogus findfirstfile. kyra now starts up correctly
................
r33135 | fingolfin | 2008-07-20 18:27:12 +0200 (Sun, 20 Jul 2008) | 1 line
cleanup
................
r33136 | fingolfin | 2008-07-20 18:28:06 +0200 (Sun, 20 Jul 2008) | 1 line
Fixed nasty bug in findPlainGameDescriptor -- contrary to is documentation, it would not return 0 upon failure to find a match, but rather a (0,0) record.
................
r33137 | fingolfin | 2008-07-20 18:42:56 +0200 (Sun, 20 Jul 2008) | 1 line
Fixed potential issue in Common::String when asserting a substring of a string X back to X (memcpy -> memmove); also added some other sanity checks, and merged some duplicate code into a new method String::initWithCStr
................
r33138 | fingolfin | 2008-07-20 18:47:34 +0200 (Sun, 20 Jul 2008) | 1 line
Two new TODO/FIXME comments for class File
................
r33139 | fingolfin | 2008-07-20 18:47:52 +0200 (Sun, 20 Jul 2008) | 1 line
New SeekableReadStream::readLine_NEW() method, closely modelled after fgets, w/o the line length limitations of the old eekableReadStream::readLine() (which it will replace, after the feature freeze has been lifted)
................
r33140 | fingolfin | 2008-07-20 18:52:25 +0200 (Sun, 20 Jul 2008) | 1 line
Fix for bug #1971499: ALL: config manager crashes when reading too long lines
................
r33141 | knakos | 2008-07-20 18:55:51 +0200 (Sun, 20 Jul 2008) | 1 line
modified patch #1882942 - optimize and kill code for really old platforms
................
r33142 | knakos | 2008-07-20 19:04:27 +0200 (Sun, 20 Jul 2008) | 1 line
a little more cleanup
................
r33143 | marcus_c | 2008-07-20 19:56:43 +0200 (Sun, 20 Jul 2008) | 1 line
Solaris tr does not like character classes in some locales. Use "C" locale.
................
r33144 | marcus_c | 2008-07-20 19:58:14 +0200 (Sun, 20 Jul 2008) | 1 line
Deps now go in the .deps directory.
................
r33145 | athrxx | 2008-07-20 20:00:00 +0200 (Sun, 20 Jul 2008) | 1 line
KYRA: disable incomplete PC-98 audio support for 0.12.0 release (use towns audio instead)
................
r33146 | eriktorbjorn | 2008-07-20 21:25:16 +0200 (Sun, 20 Jul 2008) | 2 lines
Commented out some more PC-98 audio stuff, to avoid warnings.
................
r33160 | sev | 2008-07-21 07:09:29 +0200 (Mon, 21 Jul 2008) | 2 lines
This is 0.13.0svn now
................
r33162 | peres001 | 2008-07-21 08:08:30 +0200 (Mon, 21 Jul 2008) | 1 line
Massive refactoring of dialogue code, which is now implemented as a finite state machine. Related code in other files has been updated has well.
................
r33165 | peres001 | 2008-07-21 11:25:40 +0200 (Mon, 21 Jul 2008) | 1 line
Some refactoring for tracking of floating labels.
................
r33167 | tramboi | 2008-07-21 12:13:44 +0200 (Mon, 21 Jul 2008) | 1 line
Avoid branching in the inner loop of AGOS drawVertImageCompressed
................
r33168 | Kirben | 2008-07-21 12:32:20 +0200 (Mon, 21 Jul 2008) | 1 line
Spacing.
................
r33169 | buddha_ | 2008-07-21 13:33:30 +0200 (Mon, 21 Jul 2008) | 1 line
Silence a warning which complains about using an uninitialized variable.
................
r33188 | peres001 | 2008-07-22 11:00:39 +0200 (Tue, 22 Jul 2008) | 1 line
Changed comment display code so that input polling is integrated into the main loop, instead of being performed in a blocking way from a separate routine.
................
r33189 | peres001 | 2008-07-22 11:12:10 +0200 (Tue, 22 Jul 2008) | 1 line
Removed unneeded input code.
................
r33191 | peres001 | 2008-07-22 12:12:20 +0200 (Tue, 22 Jul 2008) | 1 line
Fixed regression in dialogue code: certain commands weren't executed anymore after dialogue ended.
................
r33192 | buddha_ | 2008-07-22 12:15:58 +0200 (Tue, 22 Jul 2008) | 14 lines
Fix for bug #2019355 (FW: broken compatibility with 0.11.1 saves):
- Changed savegame loading related functions to use SeekableReadStream
rather than InSaveFile so MemoryReadStream can be used transparently.
- Fixed loadResourcesFromSave to load multiframe animations correctly
and to load 0.11.0/0.11.1 Future Wars savegames which used a slightly
different format.
- Added a savegame format detector that tries to detect between the old
Future Wars savegame format, the new one and a broken revision of the
new one.
- Changed makeLoad to first load the savegame fully into memory and only
then handle it (If the savegame's packed then it's unpacked first). If
the packed savegame can't tell its unpacked size (i.e. it's using zlib
format) then we'll try to load up to 256kB of the savegame data.
Thanks to wjp for his help with nailing this release critical bug.
................
r33193 | peres001 | 2008-07-22 12:17:19 +0200 (Tue, 22 Jul 2008) | 1 line
Fix build.
................
r33196 | buddha_ | 2008-07-22 14:17:44 +0200 (Tue, 22 Jul 2008) | 1 line
Fix CineSaveGameFormat enumeration's include order (Caused problems at least with GCC).
................
r33198 | peres001 | 2008-07-22 14:35:46 +0200 (Tue, 22 Jul 2008) | 1 line
Merged inventory input code from different files.
................
r33202 | fingolfin | 2008-07-22 16:38:54 +0200 (Tue, 22 Jul 2008) | 1 line
Fix warnings in CINE
................
r33203 | fingolfin | 2008-07-22 16:39:26 +0200 (Tue, 22 Jul 2008) | 1 line
Added String::trim() method
................
r33206 | aquadran | 2008-07-22 17:24:39 +0200 (Tue, 22 Jul 2008) | 1 line
shutup valgrind warning
................
r33210 | anotherguest | 2008-07-22 20:52:13 +0200 (Tue, 22 Jul 2008) | 1 line
Fixed seek problem when cached data is used.
................
r33212 | anotherguest | 2008-07-22 21:09:10 +0200 (Tue, 22 Jul 2008) | 1 line
Disable hashmemory pool for Symbian OS
................
r33218 | anotherguest | 2008-07-22 22:13:57 +0200 (Tue, 22 Jul 2008) | 2 lines
AddedAdded MAD as default feature
................
r33219 | peres001 | 2008-07-23 03:07:39 +0200 (Wed, 23 Jul 2008) | 1 line
More merging of input code.
................
r33220 | peres001 | 2008-07-23 04:01:15 +0200 (Wed, 23 Jul 2008) | 1 line
Fixed mouse cursor when closing inventory.
................
r33222 | drmccoy | 2008-07-23 04:41:02 +0200 (Wed, 23 Jul 2008) | 2 lines
More savegame-endianness fixes :/
................
r33224 | peres001 | 2008-07-23 04:45:09 +0200 (Wed, 23 Jul 2008) | 1 line
More decoupling of inventory code.
................
r33225 | peres001 | 2008-07-23 09:31:35 +0200 (Wed, 23 Jul 2008) | 1 line
Removed useless event management code and made readInput() more general.
................
r33226 | peres001 | 2008-07-23 09:52:43 +0200 (Wed, 23 Jul 2008) | 1 line
Removed the historical waitUntilLeftClick function and adapted code to use the more general readInput and waitForButtonEvent.
................
r33229 | Kirben | 2008-07-23 11:01:33 +0200 (Wed, 23 Jul 2008) | 1 line
Update NEWS.
................
r33230 | fingolfin | 2008-07-23 11:02:47 +0200 (Wed, 23 Jul 2008) | 1 line
Added Tinsel engine to main repos (no news item for it ON PURPOSE)
................
r33231 | dreammaster | 2008-07-23 11:28:23 +0200 (Wed, 23 Jul 2008) | 1 line
Replaced the out of date file list in the MSVC8 project with the proper file list
................
r33232 | dreammaster | 2008-07-23 11:37:15 +0200 (Wed, 23 Jul 2008) | 1 line
Added the Tinsel engine to the Scummvm MSVC8 Solution
................
r33233 | buddha_ | 2008-07-23 11:45:44 +0200 (Wed, 23 Jul 2008) | 1 line
Updated rest of the MSVC project and solution files for Tinsel.
................
r33234 | fingolfin | 2008-07-23 11:53:29 +0200 (Wed, 23 Jul 2008) | 1 line
Fix String::trim to work right for shared strings; augemented test cases to cover this
................
r33235 | fingolfin | 2008-07-23 12:27:24 +0200 (Wed, 23 Jul 2008) | 1 line
Got rid of some typedefs
................
r33236 | fingolfin | 2008-07-23 12:29:37 +0200 (Wed, 23 Jul 2008) | 1 line
Removed some dead code
................
r33237 | fingolfin | 2008-07-23 12:33:36 +0200 (Wed, 23 Jul 2008) | 1 line
cleanup; removed const bNoScroll variable
................
r33238 | dreammaster | 2008-07-23 12:54:59 +0200 (Wed, 23 Jul 2008) | 1 line
Added extra defines and include for Tinsel project
................
r33239 | buddha_ | 2008-07-23 14:15:02 +0200 (Wed, 23 Jul 2008) | 1 line
Enable Tinsel also for MSVC 7 & 7.1 & 9 in addition to MSVC 8.
................
r33240 | buddha_ | 2008-07-23 16:19:31 +0200 (Wed, 23 Jul 2008) | 3 lines
Renamed opcodes 0x49 and 0x68:
- Opcode 0x49: setDefaultMenuColor2 -> setDefaultMenuBgColor
- Opcode 0x68: setDefaultMenuColor -> setPlayerCommandPosY
................
r33241 | fingolfin | 2008-07-23 16:42:27 +0200 (Wed, 23 Jul 2008) | 1 line
Moved POLYGON struct into polygon.cpp; got rid of some more typedefs
................
r33242 | fingolfin | 2008-07-23 16:43:41 +0200 (Wed, 23 Jul 2008) | 1 line
Added svn:ignore attribute
................
r33243 | fingolfin | 2008-07-23 16:44:33 +0200 (Wed, 23 Jul 2008) | 1 line
Added Tinsel to credits & NEWS
................
r33246 | fingolfin | 2008-07-23 18:33:53 +0200 (Wed, 23 Jul 2008) | 1 line
Added convenience method String::makeUnique(); simplified String::operator=(char c); extended String unit tests
................
r33248 | fingolfin | 2008-07-23 18:49:45 +0200 (Wed, 23 Jul 2008) | 1 line
Reorder stuff a little bit, moving private String methods together: cleanup
................
r33249 | fingolfin | 2008-07-23 18:55:52 +0200 (Wed, 23 Jul 2008) | 1 line
TINSEL: Renamed CoroutineInstall back to ProcessCreate; got rid of yet another typedef; more cleanup
................
r33250 | fingolfin | 2008-07-23 19:01:42 +0200 (Wed, 23 Jul 2008) | 1 line
cleanup
................
r33252 | sev | 2008-07-23 21:50:57 +0200 (Wed, 23 Jul 2008) | 2 lines
Fix bug which was triggered by file named 'a' in current directory.
................
r33258 | peres001 | 2008-07-24 10:04:17 +0200 (Thu, 24 Jul 2008) | 1 line
Can't test a SharedPtr for nullity!
................
r33259 | fingolfin | 2008-07-24 10:59:17 +0200 (Thu, 24 Jul 2008) | 1 line
Moved scheduler / process managment code into a new class Scheduler
................
r33260 | peres001 | 2008-07-24 11:24:32 +0200 (Thu, 24 Jul 2008) | 3 lines
* Moved end intro and end game sequences code to gui.
* Rewrote all gui code to be run inside the main loop
* Added code to avoid crashes when a scene with no standard background is drawn
................
r33261 | peres001 | 2008-07-24 11:42:44 +0200 (Thu, 24 Jul 2008) | 1 line
Fixed leak in new gui code.
................
r33263 | fingolfin | 2008-07-24 12:31:37 +0200 (Thu, 24 Jul 2008) | 1 line
cleanup
................
r33266 | eriktorbjorn | 2008-07-25 00:12:48 +0200 (Fri, 25 Jul 2008) | 2 lines
Make sure _musicVolume and _sfxVolume are clipped to fit in a byte.
................
r33270 | peres001 | 2008-07-25 04:37:55 +0200 (Fri, 25 Jul 2008) | 3 lines
* Merged old input management flags into a single mouse status variable.
* Mouse is now displayed when it is needed, and hidden when it is not ;)
................
r33272 | peres001 | 2008-07-25 08:35:02 +0200 (Fri, 25 Jul 2008) | 1 line
Converted BRA to work with the new menu approach. It is not yet well plugged-in as in NS, but it suffices for the moment.
................
r33273 | peres001 | 2008-07-25 10:27:44 +0200 (Fri, 25 Jul 2008) | 1 line
Made character visible in BRA.
................
r33274 | fingolfin | 2008-07-25 11:05:04 +0200 (Fri, 25 Jul 2008) | 1 line
TINSEL: Updating the palette should only require a call to OSystem::updateScreen and not a blit
................
r33275 | fingolfin | 2008-07-25 11:12:03 +0200 (Fri, 25 Jul 2008) | 1 line
TINSEL: Get rid of Graphics::Surface class
................
r33276 | fingolfin | 2008-07-25 11:13:08 +0200 (Fri, 25 Jul 2008) | 1 line
TINSEL: ActorTag & PolyTag abused a SCNHANDLE and some global enums to keep a trinary state -- fixed that by introducing a new enum HotSpotTag
................
r33277 | fingolfin | 2008-07-25 11:15:03 +0200 (Fri, 25 Jul 2008) | 1 line
cleanup
................
r33278 | fingolfin | 2008-07-25 11:15:32 +0200 (Fri, 25 Jul 2008) | 1 line
TINSEL: Got rid of NO_TAG (not used)
................
r33279 | fingolfin | 2008-07-25 11:16:33 +0200 (Fri, 25 Jul 2008) | 1 line
Added Common::Rect::isEmpty() method
................
r33280 | fingolfin | 2008-07-25 11:17:47 +0200 (Fri, 25 Jul 2008) | 1 line
More tinsel cleanup
................
r33281 | fingolfin | 2008-07-25 11:18:39 +0200 (Fri, 25 Jul 2008) | 1 line
TINSEL: Fixed forgotten ClearScreen(0) call
................
r33282 | fingolfin | 2008-07-25 11:19:06 +0200 (Fri, 25 Jul 2008) | 1 line
TINSEL: Got rid of PIMAGE, PINT_CONTEXT, PINV_OBJECT, PINV_DEF, PCONFBOX, PCONFINIT
................
r33283 | dreammaster | 2008-07-25 11:36:18 +0200 (Fri, 25 Jul 2008) | 1 line
Fix to prevent attempt to delete a non-initialised object during game exit
................
r33285 | joostp | 2008-07-25 12:20:05 +0200 (Fri, 25 Jul 2008) | 2 lines
change PPINIT struct to use ScummVM datatypes, so sizeof(PPINIT) is 28 on ppc/OSX as well.
................
r33287 | buddha_ | 2008-07-25 13:39:58 +0200 (Fri, 25 Jul 2008) | 1 line
Update MSVC project files for Parallaction.
................
r33288 | drmccoy | 2008-07-25 14:59:46 +0200 (Fri, 25 Jul 2008) | 2 lines
Fixed the inventory bug that's been reported in the forums
................
r33289 | peres001 | 2008-07-25 18:01:25 +0200 (Fri, 25 Jul 2008) | 2 lines
* Changed walk code to use Common::Point instead of the clumsy WalkNode.
* Changed walk code to use object copy instead of managing pointers.
................
r33290 | peres001 | 2008-07-25 18:08:10 +0200 (Fri, 25 Jul 2008) | 1 line
Changed the remaining references to Nodes into Points.
................
r33295 | peres001 | 2008-07-26 04:09:50 +0200 (Sat, 26 Jul 2008) | 1 line
BRA now parses path data from the scripts.
................
r33296 | peres001 | 2008-07-26 06:01:11 +0200 (Sat, 26 Jul 2008) | 2 lines
* Added walk calculations to BRA (doesn't walk yet, though).
* Adapted Character and Animation to handle both versions of the engine.
................
r33297 | peres001 | 2008-07-26 07:37:52 +0200 (Sat, 26 Jul 2008) | 1 line
Cleanup.
................
r33298 | peres001 | 2008-07-26 07:56:39 +0200 (Sat, 26 Jul 2008) | 1 line
More cleanup.
................
r33321 | Kirben | 2008-07-27 03:54:40 +0200 (Sun, 27 Jul 2008) | 1 line
Fix buffer overflow in error message.
................
r33325 | peres001 | 2008-07-27 10:35:00 +0200 (Sun, 27 Jul 2008) | 1 line
Doug from BRA can now walk in his hotel room. He still stops in bizarre poses, though.
................
r33326 | vinterstum | 2008-07-27 12:15:57 +0200 (Sun, 27 Jul 2008) | 1 line
The iPhone backend is now (mostly) up to speed again, and works for firmware 2.0
................
r33327 | Kirben | 2008-07-27 12:36:26 +0200 (Sun, 27 Jul 2008) | 1 line
Search common directory, when loading frames and talks in Amiga verison of BRA.
................
r33328 | peres001 | 2008-07-27 12:37:54 +0200 (Sun, 27 Jul 2008) | 1 line
Added rudimental support for location changes when walking through doors. The best part of this commit is that Doug now stops in a normal position.
................
r33329 | Kirben | 2008-07-27 12:43:15 +0200 (Sun, 27 Jul 2008) | 1 line
Add music/sound loading in Amiga version of BRA.
................
r33330 | lordhoto | 2008-07-27 13:07:38 +0200 (Sun, 27 Jul 2008) | 1 line
Fixed win32 plugin provider.
................
r33332 | lordhoto | 2008-07-27 14:05:40 +0200 (Sun, 27 Jul 2008) | 2 lines
Fixed macro.
................
r33333 | lordhoto | 2008-07-27 14:09:10 +0200 (Sun, 27 Jul 2008) | 2 lines
Fixed typo.
................
r33334 | lordhoto | 2008-07-27 14:12:40 +0200 (Sun, 27 Jul 2008) | 3 lines
- Fixed fadePalette for HoF and Kyra3
- Fixed bug in wsaFrameAnimationStep
................
r33335 | peres001 | 2008-07-27 15:43:40 +0200 (Sun, 27 Jul 2008) | 1 line
Inventory icons are now loaded correctly (not yet displayed). BRA doesn't crash anymore when pressing the right button. :)
................
r33337 | peres001 | 2008-07-27 16:21:16 +0200 (Sun, 27 Jul 2008) | 1 line
Moved inventory cursor drawing code to InventoryRenderer.
................
r33338 | buddha_ | 2008-07-27 16:33:37 +0200 (Sun, 27 Jul 2008) | 1 line
Cut savegame loading into smaller functional parts (resetEngine, loadPlainSave etc).
................
r33339 | buddha_ | 2008-07-27 16:36:53 +0200 (Sun, 27 Jul 2008) | 1 line
Clear the confusing usage of NUM_MAX_VAR (It's 255 actually, not 256).
................
r33340 | anotherguest | 2008-07-27 20:22:23 +0200 (Sun, 27 Jul 2008) | 1 line
Fix for ftell error when caching. HOF now starts properly
................
r33342 | sev | 2008-07-27 23:14:31 +0200 (Sun, 27 Jul 2008) | 2 lines
Patch from bugreport #2020561: "MMNES : Incorrect detection (US/GB)"
................
r33345 | anotherguest | 2008-07-27 23:35:39 +0200 (Sun, 27 Jul 2008) | 1 line
Fixed the Symbian default savepath, but adding the needed \ at the end.
................
r33347 | anotherguest | 2008-07-27 23:37:47 +0200 (Sun, 27 Jul 2008) | 1 line
Fixed the Symbian default savepath, but adding the needed \ at the end and now as a string.
................
r33349 | buddha_ | 2008-07-28 00:50:36 +0200 (Mon, 28 Jul 2008) | 3 lines
Added a preliminary saving routine for Operation Stealth (Disabled by default, needs more work still. WIP!).
Added backgrounds' name saving (8 names in Operation Stealth instead of just 1 like in Future Wars).
Added 256 color palette saving and restoring (One of the palettes isn't properly handled yet though).
................
r33350 | peres001 | 2008-07-28 04:56:17 +0200 (Mon, 28 Jul 2008) | 1 line
Fixed constructor for WindowsFilesystemNode. On Windows, trailing slashes can be added only to directory names.
................
r33352 | peres001 | 2008-07-28 07:18:23 +0200 (Mon, 28 Jul 2008) | 3 lines
* Changed Disk code in BRA to use FilesystemNode (duplication has become truly visible!).
* Fixed Inventory items loading.
................
r33353 | peres001 | 2008-07-28 07:21:11 +0200 (Mon, 28 Jul 2008) | 1 line
Some unneeded references slipped in with the last commit.
................
r33354 | Kirben | 2008-07-28 07:38:24 +0200 (Mon, 28 Jul 2008) | 1 line
Fix compile.
................
r33355 | peres001 | 2008-07-28 08:06:35 +0200 (Mon, 28 Jul 2008) | 1 line
Inventory is now properly rendered. Item selection is not yet working.
................
r33356 | Kirben | 2008-07-28 08:18:39 +0200 (Mon, 28 Jul 2008) | 1 line
There is no mask or path directories for part0 of BRA (Amiga), so always check whether they exist.
................
r33357 | Kirben | 2008-07-28 09:20:55 +0200 (Mon, 28 Jul 2008) | 1 line
Add basic support for running Amiga and PC demos of BRA.
................
r33359 | peres001 | 2008-07-28 10:25:06 +0200 (Mon, 28 Jul 2008) | 1 line
Some instrumentation for script debugging.
................
r33360 | peres001 | 2008-07-28 10:25:52 +0200 (Mon, 28 Jul 2008) | 1 line
Added support for text in BRA DOS demo.
................
r33361 | Kirben | 2008-07-28 10:44:14 +0200 (Mon, 28 Jul 2008) | 1 line
Correct character name set by character location parser.
................
r33362 | buddha_ | 2008-07-28 10:44:49 +0200 (Mon, 28 Jul 2008) | 3 lines
Made the savegame loading routine choose between loading a Future Wars or an Operation Stealth savegame format.
Added a stub for loading the Operation Stealth's temporary savegame format (Not yet implemented).
Made mouse cursor change to a disk icon when loading a savegame and back to normal after its done.
................
r33363 | peres001 | 2008-07-28 10:56:37 +0200 (Mon, 28 Jul 2008) | 1 line
Added a post processing step to runScripts, so that Animation can be validated after buggy scripts have been executed.
................
r33364 | peres001 | 2008-07-28 11:00:00 +0200 (Mon, 28 Jul 2008) | 1 line
Preliminary code for traps.
................
r33365 | buddha_ | 2008-07-28 12:09:00 +0200 (Mon, 28 Jul 2008) | 1 line
Now detects temporary Operation Stealth savegame format and saves it. No loading yet.
................
r33366 | buddha_ | 2008-07-28 12:44:54 +0200 (Mon, 28 Jul 2008) | 1 line
Cut Future Wars savegame loading routine into parts that can be reused when loading the Operation Stealth savegame format.
................
r33367 | buddha_ | 2008-07-28 12:54:53 +0200 (Mon, 28 Jul 2008) | 1 line
Added remaining load functions needed for the Operation Stealth savegame format loading (loadSeqList and loadZoneQuery). Not used yet.
................
r33369 | peres001 | 2008-07-28 13:47:03 +0200 (Mon, 28 Jul 2008) | 1 line
Tiny readability aid for parser code.
................
r33370 | peres001 | 2008-07-28 13:48:04 +0200 (Mon, 28 Jul 2008) | 1 line
Implemented opcodes for picking up/dropping/opening/closing items.
................
r33371 | peres001 | 2008-07-28 13:50:36 +0200 (Mon, 28 Jul 2008) | 1 line
Pick up/drop/open/close actions are now available in game.
................
r33373 | thebluegr | 2008-07-28 14:46:30 +0200 (Mon, 28 Jul 2008) | 1 line
Cleanup
................
r33375 | peres001 | 2008-07-28 16:02:46 +0200 (Mon, 28 Jul 2008) | 1 line
Fixed loading of static items.
................
r33376 | peres001 | 2008-07-28 16:22:44 +0200 (Mon, 28 Jul 2008) | 1 line
Moved validation step from revision 33363, so that it is executed for all animations.
................
r33377 | peres001 | 2008-07-28 16:23:49 +0200 (Mon, 28 Jul 2008) | 1 line
Yet another hack to deal with labels... Must rethink this crap from scratch.
................
r33379 | buddha_ | 2008-07-28 18:02:40 +0200 (Mon, 28 Jul 2008) | 6 lines
Added loading of temporary Operation Stealth savegames. Needs testing!
- Music related settings and adBgVar0 & adBgVar1 aren't loaded currently.
Modified resetEngine to also reset more of the Operation Stealth specific variables.
Added getter for background scrolling value.
Changed additional background indices 1 & 2 from byte to uint16.
Made savegame loading functions return !in.ioFailed() as return value instead of true as previously.
................
r33380 | buddha_ | 2008-07-28 18:46:20 +0200 (Mon, 28 Jul 2008) | 1 line
Fixed crash when running Operation Stealth introduced in r33339 (There are actually 256 global variables although only 255 of them are saved and loaded from savegames. The last one is VAR_BYPASS_PROTECTION and it is written to in the mainLoop so that's why there was a crash).
................
r33383 | fingolfin | 2008-07-29 00:21:11 +0200 (Tue, 29 Jul 2008) | 1 line
Fixing 'warning: comparison of unsigned expression < 0 is always false'
................
r33384 | peres001 | 2008-07-29 01:21:03 +0200 (Tue, 29 Jul 2008) | 1 line
Enforcing use of nullZonePtr only for nulling out pointers, as it is useless for comparisons.
................
r33385 | fingolfin | 2008-07-29 02:02:06 +0200 (Tue, 29 Jul 2008) | 1 line
SDL: Properly init vars related to mixer double buffering
................
r33387 | fingolfin | 2008-07-29 02:49:44 +0200 (Tue, 29 Jul 2008) | 1 line
Changed output of --test-detector: multiple hits with same gameid now only are a warning, not a failure
................
r33388 | fingolfin | 2008-07-29 02:50:12 +0200 (Tue, 29 Jul 2008) | 1 line
Changed advanced detector to *always* use the FSNode API for detection (i.e. killed second code path which used File::open trial&error directory 'scanning')
................
r33389 | fingolfin | 2008-07-29 02:54:28 +0200 (Tue, 29 Jul 2008) | 1 line
BASE: in runGame, do not set addDefaultDirectory() the game path before invoking createInstance() -- detectors must use FSNode for detection, not rely on File::open
................
r33392 | peres001 | 2008-07-29 05:14:35 +0200 (Tue, 29 Jul 2008) | 2 lines
* Fixed positioning of balloons and faces in BRA (dos, at least).
* Adapted loading of faces.
................
r33393 | Kirben | 2008-07-29 06:00:07 +0200 (Tue, 29 Jul 2008) | 1 line
Add check common directories, in loadScenery() for Amiga version of BRA.
................
r33394 | Kirben | 2008-07-29 06:06:10 +0200 (Tue, 29 Jul 2008) | 1 line
Mask files don't always exist in Amiga version of BRA, in paricular NULL.msk.
................
r33400 | lordhoto | 2008-07-29 11:16:53 +0200 (Tue, 29 Jul 2008) | 2 lines
Added a reset method to SharedPtr, which allows NULLifying it.
................
r33401 | lordhoto | 2008-07-29 11:23:54 +0200 (Tue, 29 Jul 2008) | 2 lines
Formatting.
................
r33402 | peres001 | 2008-07-29 11:44:05 +0200 (Tue, 29 Jul 2008) | 1 line
Added dialogue text rendering for BRA.
................
r33404 | buddha_ | 2008-07-29 12:13:53 +0200 (Tue, 29 Jul 2008) | 6 lines
Rearranged parts of the Operation Stealth savegame loading routine.
- Emulating the Future Wars savegame loading routine and hoping for the best.
- Fixes an array out of bounds access when loading the global scripts.
Now the loading crashes in the mainloop in processSeqList!
But at least we got a bit farther this time. More fixing to come...
................
r33405 | peres001 | 2008-07-29 12:22:50 +0200 (Tue, 29 Jul 2008) | 2 lines
* Added flexible verb configuration for both NS and BRA.
* Objects can now be really opened and closed in BRA.
................
r33407 | buddha_ | 2008-07-29 14:56:32 +0200 (Tue, 29 Jul 2008) | 1 line
Added a debug message to loadTempSaveOS's to check whether we loaded the whole savefile. Made objectStruct's clearing also clear x and y member variables in resetEngine.
................
r33408 | peres001 | 2008-07-29 14:59:55 +0200 (Tue, 29 Jul 2008) | 2 lines
* Implemented pause/resume of command execution
* Implemented command opcode MOVE (not the script instruction).
................
r33409 | buddha_ | 2008-07-29 15:44:14 +0200 (Tue, 29 Jul 2008) | 7 lines
Added purgeSeqList function (Used in mainloop now). Let's see if this helps any...
Renamed functions:
* addScriptToList0 -> addScriptToGlobalScripts
* executeList0 -> executeGlobalScripts
* executeList1 -> executeObjectScripts
* purgeList1 -> purgeObjectScripts (Also added a clarifying TODO to this function)
* purgeList0 -> purgeGlobalScripts (Also added a clarifying TODO to this function)
................
r33410 | buddha_ | 2008-07-29 15:46:42 +0200 (Tue, 29 Jul 2008) | 1 line
Make sure processSeqList and purgeSeqList are only called in the main loop when running Operation Stealth. Mostly a precaution as the seqList should be totally empty when running Future Wars as it doesn't use it.
................
r33412 | fingolfin | 2008-07-29 18:09:10 +0200 (Tue, 29 Jul 2008) | 1 line
Changed class File (and derived classes) to only support read-only access; added a new class DumpFile for writing
................
r33413 | fingolfin | 2008-07-29 18:12:42 +0200 (Tue, 29 Jul 2008) | 1 line
CONFIGMAN: Store domains in the order they were added
................
r33414 | fingolfin | 2008-07-29 18:16:15 +0200 (Tue, 29 Jul 2008) | 1 line
Added convenience accessor method GameDescriptor::preferredtarget
................
r33415 | fingolfin | 2008-07-29 18:29:28 +0200 (Tue, 29 Jul 2008) | 1 line
Mass detector: sort all newly detected games by target name before adding them to the config manager
................
r33416 | lordhoto | 2008-07-29 19:00:15 +0200 (Tue, 29 Jul 2008) | 2 lines
Added documentation for the functions in algorithm.h.
................
r33418 | fingolfin | 2008-07-29 19:38:07 +0200 (Tue, 29 Jul 2008) | 1 line
Set svn:ignore for tools/create_drascula
................
r33419 | fingolfin | 2008-07-29 19:42:19 +0200 (Tue, 29 Jul 2008) | 1 line
Added two new classes, BufferedReadStream & BufferedSeekableReadStream, as proposed on scummvm-devel
................
r33425 | lordhoto | 2008-07-29 22:09:30 +0200 (Tue, 29 Jul 2008) | 2 lines
Documentation for func.h.
................
r33426 | lordhoto | 2008-07-29 22:15:29 +0200 (Tue, 29 Jul 2008) | 2 lines
Little fix for documentation.
................
r33427 | lordhoto | 2008-07-29 22:21:54 +0200 (Tue, 29 Jul 2008) | 3 lines
- Formatting
- Improved Functor#Mem::isValid implementations.
................
r33432 | peres001 | 2008-07-30 08:25:17 +0200 (Wed, 30 Jul 2008) | 1 line
Reordered initialization lists to silence warning.
................
r33436 | fingolfin | 2008-07-30 09:39:41 +0200 (Wed, 30 Jul 2008) | 1 line
Changed BufferedReadStream to not permanently decrease its buffer size at the end of a stream (this would fail when using BufferedSeekableReadStream and then seeking back from the end); this also fixes a bug which let you seek back beyond the start of a stream (not that we currently support that in other streams)
................
r33437 | peres001 | 2008-07-30 09:58:25 +0200 (Wed, 30 Jul 2008) | 2 lines
* Unified implementation of flow control opcodes in NS and BRA
* Simplified script execution loop and context
................
r33438 | thebluegr | 2008-07-30 10:23:04 +0200 (Wed, 30 Jul 2008) | 1 line
Make sure that save game descriptions are 0-terminated
................
r33444 | buddha_ | 2008-07-30 13:03:52 +0200 (Wed, 30 Jul 2008) | 1 line
Added some debug aids related to addAni and the processSeqList crashing.
................
r33446 | buddha_ | 2008-07-30 13:36:14 +0200 (Wed, 30 Jul 2008) | 1 line
Debug printing a couple more relevant variables in addAni.
................
r33452 | peres001 | 2008-07-30 17:01:15 +0200 (Wed, 30 Jul 2008) | 1 line
Reordered initialization order to kill a ton of warnings.
................
r33453 | fingolfin | 2008-07-30 17:16:57 +0200 (Wed, 30 Jul 2008) | 1 line
Advanced detector: split out part of detectGame into a new function detectGameFilebased; some cleanup
................
r33455 | fingolfin | 2008-07-30 17:38:42 +0200 (Wed, 30 Jul 2008) | 1 line
Simplified advanced detector file sys scanning code
................
r33456 | fingolfin | 2008-07-30 17:44:34 +0200 (Wed, 30 Jul 2008) | 1 line
Revert my accidental commit of the OSystem changes (oops)
................
r33457 | fingolfin | 2008-07-30 17:48:16 +0200 (Wed, 30 Jul 2008) | 1 line
Simplify/optimize/cleanup detectGameFilebased further
................
r33458 | peres001 | 2008-07-30 18:06:46 +0200 (Wed, 30 Jul 2008) | 1 line
Fixed Win32 build, after Fingolfin's commits (probably because of the revert in revision 33456).
................
r33459 | fingolfin | 2008-07-30 18:26:38 +0200 (Wed, 30 Jul 2008) | 1 line
This time properly reverted my accidental commits of the osystem&configman patch (I didn't mean to commit it in the first place, still waiting for any replies to my corresponding scummvm-devel mail). Sorry for messing up so badly
................
r33463 | lordhoto | 2008-07-31 12:47:15 +0200 (Thu, 31 Jul 2008) | 2 lines
Committed slightly modified patch #2029395 "KYRA: Lands of Lore Intro + Character selection".
................
r33464 | lordhoto | 2008-07-31 12:52:29 +0200 (Thu, 31 Jul 2008) | 2 lines
Removed debugging leftover.
................
r33466 | buddha_ | 2008-07-31 13:16:48 +0200 (Thu, 31 Jul 2008) | 1 line
Update MSVC project files for Kyra Lands of Lore additions.
................
r33467 | peres001 | 2008-07-31 13:29:37 +0200 (Thu, 31 Jul 2008) | 1 line
Set correct font for dialogues in BRA Amiga.
................
r33468 | peres001 | 2008-07-31 14:26:12 +0200 (Thu, 31 Jul 2008) | 1 line
Changed Gfx::_backgroundInfo to be a pointer. This temporarily kills all z-buffering.
................
r33469 | peres001 | 2008-07-31 14:50:43 +0200 (Thu, 31 Jul 2008) | 1 line
Made changing of background more flexible, in that the engine can now configure its BackgroundInfo before passing it to Gfx.
................
r33470 | lordhoto | 2008-07-31 15:36:13 +0200 (Thu, 31 Jul 2008) | 3 lines
- Added Common::mem_fun_ref for object references instead of pointers.
- Added simple tests for a little bit functionallity from common/func.h
................
r33471 | eriktorbjorn | 2008-07-31 15:45:58 +0200 (Thu, 31 Jul 2008) | 4 lines
Applied my patch #2030058 ("Workaround for incorrectly compressed FotAQ"), and
made a mention in NEWS that speech is played correctly now. Of course, we
should still provide a correctly compressed version at some point.
................
r33473 | peres001 | 2008-07-31 16:20:51 +0200 (Thu, 31 Jul 2008) | 1 line
Disabled masks in BRA Amiga, because the decoding is not known yet.
................
r33474 | peres001 | 2008-07-31 17:15:42 +0200 (Thu, 31 Jul 2008) | 2 lines
* Removed references to the current _backgroundInfo from parser code.
* Re-enabled masks (in BRA DOS).
................
r33478 | anotherguest | 2008-07-31 19:33:48 +0200 (Thu, 31 Jul 2008) | 1 line
Enabled the correct features for standard builds
................
svn-id: r33486
2008-08-01 08:55:21 +00:00
|
|
|
if (!f->open(filename))
|
2008-06-25 14:19:56 +00:00
|
|
|
return false;
|
|
|
|
|
2008-06-26 13:50:16 +00:00
|
|
|
_fileName = filename;
|
2008-06-25 14:19:56 +00:00
|
|
|
_text.loadStream(f);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2008-06-26 13:50:16 +00:00
|
|
|
/**
|
|
|
|
* Loads a memory buffer into the parser.
|
|
|
|
* Used for loading the default theme fallback directly
|
|
|
|
* from memory if no themes can be found.
|
|
|
|
*
|
|
|
|
* @param buffer Pointer to the buffer.
|
2008-07-03 16:09:54 +00:00
|
|
|
* @param size Size of the buffer
|
2008-06-26 13:50:16 +00:00
|
|
|
* @param disposable Sets if the XMLParser owns the buffer,
|
|
|
|
* i.e. if it can be freed safely after it's
|
|
|
|
* no longer needed by the parser.
|
|
|
|
*/
|
2008-07-30 14:08:07 +00:00
|
|
|
bool loadBuffer(const byte *buffer, uint32 size, bool disposable = false) {
|
2008-07-03 16:09:54 +00:00
|
|
|
_text.loadStream(new MemoryReadStream(buffer, size, disposable));
|
2008-06-26 13:50:16 +00:00
|
|
|
_fileName = "Memory Stream";
|
2008-06-25 14:19:56 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2008-06-26 13:50:16 +00:00
|
|
|
/**
|
|
|
|
* The actual parsing function.
|
|
|
|
* Parses the loaded data stream, returns true if successful.
|
|
|
|
*/
|
2008-07-30 14:08:07 +00:00
|
|
|
bool parse();
|
2008-06-18 23:49:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the active node being parsed (the one on top of
|
|
|
|
* the node stack).
|
|
|
|
*/
|
2008-06-25 17:56:00 +00:00
|
|
|
ParserNode *getActiveNode() {
|
2008-06-18 23:49:47 +00:00
|
|
|
if (!_activeKey.empty())
|
|
|
|
return _activeKey.top();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-06-25 17:56:00 +00:00
|
|
|
/**
|
|
|
|
* Returns the parent of a given node in the stack.
|
|
|
|
*/
|
|
|
|
ParserNode *getParentNode(ParserNode *child) {
|
|
|
|
return child->depth > 0 ? _activeKey[child->depth - 1] : 0;
|
|
|
|
}
|
|
|
|
|
2008-06-18 23:49:47 +00:00
|
|
|
protected:
|
2008-07-30 13:33:32 +00:00
|
|
|
|
2008-06-18 23:49:47 +00:00
|
|
|
/**
|
2008-07-30 13:33:32 +00:00
|
|
|
* The buildLayout function builds the layout for the parser to use
|
|
|
|
* based on a series of helper macros. This function is automatically
|
|
|
|
* generated by the CUSTOM_XML_PARSER() macro on custom parsers.
|
2008-06-18 23:49:47 +00:00
|
|
|
*
|
2008-07-30 13:33:32 +00:00
|
|
|
* See the documentation regarding XML layouts.
|
|
|
|
*/
|
|
|
|
virtual void buildLayout() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The keycallback function is automatically overloaded on custom parsers
|
|
|
|
* when using the CUSTOM_XML_PARSER() macro.
|
2008-06-18 23:49:47 +00:00
|
|
|
*
|
2008-07-30 13:33:32 +00:00
|
|
|
* Its job is to call the corresponding Callback function for the given node.
|
|
|
|
* A function for each key type must be declared separately. See the custom
|
|
|
|
* parser creation instructions.
|
2008-06-18 23:49:47 +00:00
|
|
|
*
|
2008-07-30 13:33:32 +00:00
|
|
|
* When parsing a key in such function, one may chose to skip it, e.g. because it's not needed
|
2008-06-24 19:48:01 +00:00
|
|
|
* on the current configuration. In order to ignore a key, you must set
|
|
|
|
* the "ignore" field of its KeyNode struct to "true": The key and all its children
|
|
|
|
* will then be automatically ignored by the parser.
|
|
|
|
*
|
2008-07-30 13:33:32 +00:00
|
|
|
* The callback function must return true if the key was properly handled (this includes the case when the
|
|
|
|
* key is being ignored). False otherwise. The return of keyCallback() is the same as
|
|
|
|
* the callback function's.
|
2008-06-18 23:49:47 +00:00
|
|
|
* See the sample implementation in GUI::ThemeParser.
|
|
|
|
*/
|
2008-07-30 13:33:32 +00:00
|
|
|
virtual bool keyCallback(ParserNode *node) = 0;
|
2008-06-18 23:49:47 +00:00
|
|
|
|
2008-07-04 23:51:23 +00:00
|
|
|
/**
|
2008-07-30 13:33:32 +00:00
|
|
|
* The closed key callback function MAY be overloaded by inheriting classes to
|
2008-07-04 23:51:23 +00:00
|
|
|
* implement parser-specific functions.
|
|
|
|
*
|
|
|
|
* The closedKeyCallback is issued once a key has been finished parsing, to let
|
|
|
|
* the parser verify that all the required subkeys, etc, were included.
|
|
|
|
*
|
|
|
|
* Returns true if the key was properly closed, false otherwise.
|
|
|
|
* By default, all keys are properly closed.
|
|
|
|
*/
|
2008-07-30 13:33:32 +00:00
|
|
|
virtual bool closedKeyCallback(ParserNode *node) {
|
2008-07-04 23:51:23 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2008-06-18 23:49:47 +00:00
|
|
|
/**
|
|
|
|
* Parses the value of a given key. There's no reason to overload this.
|
|
|
|
*/
|
2008-07-30 13:33:32 +00:00
|
|
|
bool parseKeyValue(Common::String keyName);
|
2008-06-18 23:49:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Called once a key has been parsed. It handles the closing/cleanup of the
|
|
|
|
* node stack and calls the keyCallback.
|
|
|
|
*/
|
2008-07-30 13:33:32 +00:00
|
|
|
bool parseActiveKey(bool closed);
|
2008-06-18 23:49:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Prints an error message when parsing fails and stops the parser.
|
2008-06-25 14:19:56 +00:00
|
|
|
* Parser error always returns "false" so we can pass the return value directly
|
|
|
|
* and break down the parsing.
|
2008-06-18 23:49:47 +00:00
|
|
|
*/
|
2008-07-30 13:33:32 +00:00
|
|
|
bool parserError(const char *errorString, ...) GCC_PRINTF(2, 3);
|
2008-06-18 23:49:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Skips spaces/whitelines etc. Returns true if any spaces were skipped.
|
|
|
|
*/
|
2008-07-30 14:08:07 +00:00
|
|
|
bool skipSpaces() {
|
2008-06-18 23:49:47 +00:00
|
|
|
if (!isspace(_text[_pos]))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
while (_text[_pos] && isspace(_text[_pos]))
|
|
|
|
_pos++;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Skips comment blocks and comment lines.
|
|
|
|
* Returns true if any comments were skipped.
|
|
|
|
* Overload this if you want to disable comments on your XML syntax
|
|
|
|
* or to change the commenting syntax.
|
|
|
|
*/
|
|
|
|
virtual bool skipComments() {
|
|
|
|
if (_text[_pos] == '/' && _text[_pos + 1] == '*') {
|
|
|
|
_pos += 2;
|
|
|
|
while (_text[_pos++]) {
|
|
|
|
if (_text[_pos - 2] == '*' && _text[_pos - 1] == '/')
|
|
|
|
break;
|
|
|
|
if (_text[_pos] == 0)
|
|
|
|
parserError("Comment has no closure.");
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Check if a given character can be part of a KEY or VALUE name.
|
|
|
|
* Overload this if you want to support keys with strange characters
|
|
|
|
* in their name.
|
|
|
|
*/
|
|
|
|
virtual bool isValidNameChar(char c) {
|
|
|
|
return isalnum(c) || c == '_';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Parses a the first textual token found.
|
|
|
|
* There's no reason to overload this.
|
|
|
|
*/
|
2008-07-30 13:33:32 +00:00
|
|
|
bool parseToken() {
|
2008-06-18 23:49:47 +00:00
|
|
|
_token.clear();
|
|
|
|
while (isValidNameChar(_text[_pos]))
|
|
|
|
_token += _text[_pos++];
|
|
|
|
|
2008-07-04 11:56:31 +00:00
|
|
|
return isspace(_text[_pos]) != 0 || _text[_pos] == '>' || _text[_pos] == '=';
|
2008-06-18 23:49:47 +00:00
|
|
|
}
|
|
|
|
|
2008-06-28 00:02:54 +00:00
|
|
|
/**
|
|
|
|
* Parses the values inside an integer key.
|
|
|
|
* The count parameter specifies the number of values inside
|
|
|
|
* the key, which are expected to be separated with commas.
|
|
|
|
*
|
|
|
|
* Sample usage:
|
|
|
|
* parseIntegerKey("255, 255, 255", 3, &red, &green, &blue);
|
|
|
|
* [will parse each field into its own integer]
|
|
|
|
*
|
|
|
|
* parseIntegerKey("1234", 1, &number);
|
|
|
|
* [will parse the single number into the variable]
|
|
|
|
*
|
|
|
|
* @param key String containing the integers to be parsed.
|
|
|
|
* @param count Number of comma-separated ints in the string.
|
|
|
|
* @param ... Integer variables to store the parsed ints, passed
|
|
|
|
* by reference.
|
|
|
|
* @returns True if the parsing succeeded.
|
|
|
|
*/
|
2008-07-30 13:33:32 +00:00
|
|
|
bool parseIntegerKey(const char *key, int count, ...) {
|
2008-06-28 13:44:10 +00:00
|
|
|
char *parseEnd;
|
2008-06-28 00:02:54 +00:00
|
|
|
int *num_ptr;
|
|
|
|
|
|
|
|
va_list args;
|
|
|
|
va_start(args, count);
|
|
|
|
|
|
|
|
while (count--) {
|
|
|
|
while (isspace(*key))
|
|
|
|
key++;
|
|
|
|
|
|
|
|
num_ptr = va_arg(args, int*);
|
|
|
|
*num_ptr = strtol(key, &parseEnd, 10);
|
|
|
|
|
2008-06-28 13:44:10 +00:00
|
|
|
key = parseEnd;
|
2008-06-28 00:02:54 +00:00
|
|
|
|
2008-06-28 13:44:10 +00:00
|
|
|
while (isspace(*key))
|
|
|
|
key++;
|
2008-06-28 00:02:54 +00:00
|
|
|
|
2008-06-28 13:44:10 +00:00
|
|
|
if (count && *key++ != ',')
|
|
|
|
return false;
|
2008-06-28 00:02:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
va_end(args);
|
2008-06-28 13:44:10 +00:00
|
|
|
return (*key == 0);
|
2008-06-28 00:02:54 +00:00
|
|
|
}
|
|
|
|
|
2008-07-03 19:42:04 +00:00
|
|
|
/**
|
|
|
|
* Overload if your parser needs to support parsing the same file
|
|
|
|
* several times, so you can clean up the internal state of the
|
|
|
|
* parser before each parse.
|
|
|
|
*/
|
|
|
|
virtual void cleanup() {}
|
|
|
|
|
2008-07-30 14:08:07 +00:00
|
|
|
|
|
|
|
private:
|
2008-06-18 23:49:47 +00:00
|
|
|
int _pos; /** Current position on the XML buffer. */
|
2008-06-25 11:34:58 +00:00
|
|
|
XMLStream _text; /** Buffer with the text being parsed */
|
2008-06-25 17:56:00 +00:00
|
|
|
Common::String _fileName;
|
2008-06-18 23:49:47 +00:00
|
|
|
|
|
|
|
ParserState _state; /** Internal state of the parser */
|
|
|
|
|
|
|
|
Common::String _error; /** Current error message */
|
|
|
|
Common::String _token; /** Current text token */
|
|
|
|
|
2008-07-03 19:32:57 +00:00
|
|
|
Common::Stack<ParserNode*> _activeKey; /** Node stack of the parsed keys */
|
2008-06-18 23:49:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|