Files
MagicSetEditor2/src/data/game.hpp
T
twanvl 0caaf01a78 Implemented the context management part of the ScriptManager
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@61 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-10-30 21:39:58 +00:00

60 lines
2.2 KiB
C++

//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2006 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#ifndef HEADER_DATA_GAME
#define HEADER_DATA_GAME
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <util/io/package.hpp>
#include <script/scriptable.hpp>
#include <script/dependency.hpp>
#include <util/dynamic_arg.hpp>
DECLARE_POINTER_TYPE(Field);
DECLARE_POINTER_TYPE(Game);
// ----------------------------------------------------------------------------- : Game
/// Game that is used for cards constructed with the default constructor, as well as for reading stylesheets
DECLARE_DYNAMIC_ARG(Game*, game_for_reading);
/// A description of a card game
class Game : public Packaged {
public:
Game();
String full_name; ///< Name of this game, for menus etc.
String icon_filename; ///< Filename of icon to use in NewWindow
OptionalScript init_script; ///< Script of variables available to other scripts in this game
vector<FieldP> set_fields; ///< Fields for set information
vector<FieldP> card_fields; ///< Fields on each card
vector<Dependency> dependent_scripts_cards; ///< scripts that depend on the card list
vector<Dependency> dependent_scripts_keywords; ///< scripts that depend on the keywords
bool dependencies_initialized; ///< are the script dependencies comming from this game all initialized?
/// Loads the game with a particular name, for example "magic"
static GameP byName(const String& name);
/// Is this Magic the Gathering?
bool isMagic() const;
static String typeNameStatic();
virtual String typeName() const;
virtual String fullName() const;
virtual InputStreamP openIconFile();
protected:
virtual void validate(Version);
DECLARE_REFLECTION();
};
// ----------------------------------------------------------------------------- : EOF
#endif