mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
changes to data formats: now using Packaged, implemented more things
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@9 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -13,6 +13,8 @@ typedef pair<SymbolPartP,SymbolPartCombine> pair_part_combine_t;
|
|||||||
typedef pair<SymbolPartP,size_t > pair_part_size_t;
|
typedef pair<SymbolPartP,size_t > pair_part_size_t;
|
||||||
DECLARE_TYPEOF_COLLECTION(pair_part_combine_t);
|
DECLARE_TYPEOF_COLLECTION(pair_part_combine_t);
|
||||||
DECLARE_TYPEOF_COLLECTION(pair_part_size_t);
|
DECLARE_TYPEOF_COLLECTION(pair_part_size_t);
|
||||||
|
DECLARE_TYPEOF_COLLECTION(SymbolPartP);
|
||||||
|
DECLARE_TYPEOF_COLLECTION(ControlPointP);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------- : Moving symbol parts
|
// ----------------------------------------------------------------------------- : Moving symbol parts
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
|
|
||||||
#include <data/action/symbol_part.hpp>
|
#include <data/action/symbol_part.hpp>
|
||||||
#include <gfx/bezier.hpp>
|
#include <gfx/bezier.hpp>
|
||||||
|
|
||||||
DECLARE_TYPEOF_COLLECTION(Vector2D);
|
DECLARE_TYPEOF_COLLECTION(Vector2D);
|
||||||
|
DECLARE_TYPEOF_COLLECTION(ControlPointP);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------- : Utility
|
// ----------------------------------------------------------------------------- : Utility
|
||||||
|
|
||||||
@@ -324,6 +326,7 @@ void SinglePointRemoveAction::perform(bool toUndo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DECLARE_POINTER_TYPE(SinglePointRemoveAction);
|
DECLARE_POINTER_TYPE(SinglePointRemoveAction);
|
||||||
|
DECLARE_TYPEOF_COLLECTION(SinglePointRemoveActionP);
|
||||||
|
|
||||||
|
|
||||||
// Remove a set of points from a symbol part.
|
// Remove a set of points from a symbol part.
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
#include <data/field.hpp>
|
#include <data/field.hpp>
|
||||||
#include <util/error.hpp>
|
#include <util/error.hpp>
|
||||||
|
|
||||||
|
DECLARE_TYPEOF_COLLECTION(FieldP);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------- : Card
|
// ----------------------------------------------------------------------------- : Card
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_ARG(Game*, game_for_new_cards, nullptr);
|
IMPLEMENT_DYNAMIC_ARG(Game*, game_for_new_cards, nullptr);
|
||||||
|
|||||||
@@ -14,7 +14,9 @@
|
|||||||
#include <util/dynamic_arg.hpp>
|
#include <util/dynamic_arg.hpp>
|
||||||
|
|
||||||
class Game;
|
class Game;
|
||||||
|
#ifndef HEADER_DATA_GAME
|
||||||
DECLARE_POINTER_TYPE(Field);
|
DECLARE_POINTER_TYPE(Field);
|
||||||
|
#endif
|
||||||
DECLARE_POINTER_TYPE(Value);
|
DECLARE_POINTER_TYPE(Value);
|
||||||
DECLARE_POINTER_TYPE(CardStyle);
|
DECLARE_POINTER_TYPE(CardStyle);
|
||||||
|
|
||||||
|
|||||||
@@ -9,3 +9,7 @@
|
|||||||
#include <data/game.hpp>
|
#include <data/game.hpp>
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------- : Game
|
// ----------------------------------------------------------------------------- : Game
|
||||||
|
|
||||||
|
bool Game::isMagic() const {
|
||||||
|
return name() == _("magic");
|
||||||
|
}
|
||||||
+5
-1
@@ -10,6 +10,7 @@
|
|||||||
// ----------------------------------------------------------------------------- : Includes
|
// ----------------------------------------------------------------------------- : Includes
|
||||||
|
|
||||||
#include <util/prec.hpp>
|
#include <util/prec.hpp>
|
||||||
|
#include <util/io/package.hpp>
|
||||||
|
|
||||||
#ifndef HEADER_DATA_CARD
|
#ifndef HEADER_DATA_CARD
|
||||||
DECLARE_POINTER_TYPE(Field);
|
DECLARE_POINTER_TYPE(Field);
|
||||||
@@ -17,12 +18,15 @@ DECLARE_POINTER_TYPE(Field);
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------- : Game
|
// ----------------------------------------------------------------------------- : Game
|
||||||
|
|
||||||
class Game {
|
class Game : public Packaged {
|
||||||
public:
|
public:
|
||||||
String fullName;
|
String fullName;
|
||||||
String iconFilename;
|
String iconFilename;
|
||||||
vector<FieldP> setFields;
|
vector<FieldP> setFields;
|
||||||
vector<FieldP> cardFields;
|
vector<FieldP> cardFields;
|
||||||
|
|
||||||
|
// Is this Magic the Gathering?
|
||||||
|
bool isMagic() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------- : EOF
|
// ----------------------------------------------------------------------------- : EOF
|
||||||
|
|||||||
+5
-2
@@ -12,6 +12,7 @@
|
|||||||
#include <util/prec.hpp>
|
#include <util/prec.hpp>
|
||||||
#include <util/reflect.hpp>
|
#include <util/reflect.hpp>
|
||||||
#include <util/action_stack.hpp>
|
#include <util/action_stack.hpp>
|
||||||
|
#include <util/io/package.hpp>
|
||||||
|
|
||||||
DECLARE_POINTER_TYPE(Card);
|
DECLARE_POINTER_TYPE(Card);
|
||||||
DECLARE_POINTER_TYPE(Set);
|
DECLARE_POINTER_TYPE(Set);
|
||||||
@@ -20,7 +21,7 @@ DECLARE_POINTER_TYPE(Game);
|
|||||||
// ----------------------------------------------------------------------------- : Set
|
// ----------------------------------------------------------------------------- : Set
|
||||||
|
|
||||||
/// A set of cards
|
/// A set of cards
|
||||||
class Set {
|
class Set : public Packaged {
|
||||||
public:
|
public:
|
||||||
/// The game this set uses
|
/// The game this set uses
|
||||||
GameP game;
|
GameP game;
|
||||||
@@ -52,8 +53,10 @@ class SetView : public ActionListener {
|
|||||||
/// The set that is currently being viewed, should not be modified directly!
|
/// The set that is currently being viewed, should not be modified directly!
|
||||||
SetP set;
|
SetP set;
|
||||||
|
|
||||||
/// Called when another set is being viewn (using setSet)
|
/// Called when another set is being viewed (using setSet)
|
||||||
virtual void onChangeSet() {}
|
virtual void onChangeSet() {}
|
||||||
|
/// Called when just before another set is being viewed (using setSet)
|
||||||
|
virtual void onBeforeChangeSet() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
#include <data/symbol.hpp>
|
#include <data/symbol.hpp>
|
||||||
#include <gfx/bezier.hpp>
|
#include <gfx/bezier.hpp>
|
||||||
|
|
||||||
|
DECLARE_TYPEOF_COLLECTION(SymbolPartP);
|
||||||
|
DECLARE_TYPEOF_COLLECTION(ControlPointP);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------- : ControlPoint
|
// ----------------------------------------------------------------------------- : ControlPoint
|
||||||
|
|
||||||
IMPLEMENT_REFLECTION_ENUM(LockMode) {
|
IMPLEMENT_REFLECTION_ENUM(LockMode) {
|
||||||
|
|||||||
@@ -322,15 +322,33 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="set"
|
Name="set"
|
||||||
Filter="">
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\gui\set\cards_panel.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\gui\set\cards_panel.hpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\gui\set\panel.hpp">
|
RelativePath=".\gui\set\panel.hpp">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\gui\set\set_info_panel.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\gui\set\set_info_panel.hpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\gui\set\stats_panel.cpp">
|
RelativePath=".\gui\set\stats_panel.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\gui\set\stats_panel.hpp">
|
RelativePath=".\gui\set\stats_panel.hpp">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\gui\set\style_panel.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\gui\set\style_panel.hpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\gui\set\window.cpp">
|
RelativePath=".\gui\set\window.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -558,6 +576,12 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\data\set.hpp">
|
RelativePath=".\data\set.hpp">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\data\settings.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\data\settings.hpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\data\symbol.cpp">
|
RelativePath=".\data\symbol.cpp">
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
@@ -616,6 +640,34 @@
|
|||||||
RelativePath=".\data\action\symbol_part.hpp">
|
RelativePath=".\data\action\symbol_part.hpp">
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="format"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\data\format\apprentice.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\data\format\formats.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\data\format\formats.hpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\data\format\html.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\data\format\mse1.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\data\format\mse2.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\data\format\mtg_editor.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\data\format\mws.cpp">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="util"
|
Name="util"
|
||||||
|
|||||||
Reference in New Issue
Block a user