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;
|
||||
DECLARE_TYPEOF_COLLECTION(pair_part_combine_t);
|
||||
DECLARE_TYPEOF_COLLECTION(pair_part_size_t);
|
||||
DECLARE_TYPEOF_COLLECTION(SymbolPartP);
|
||||
DECLARE_TYPEOF_COLLECTION(ControlPointP);
|
||||
|
||||
// ----------------------------------------------------------------------------- : Moving symbol parts
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
#include <data/action/symbol_part.hpp>
|
||||
#include <gfx/bezier.hpp>
|
||||
|
||||
DECLARE_TYPEOF_COLLECTION(Vector2D);
|
||||
DECLARE_TYPEOF_COLLECTION(ControlPointP);
|
||||
|
||||
// ----------------------------------------------------------------------------- : Utility
|
||||
|
||||
@@ -324,6 +326,7 @@ void SinglePointRemoveAction::perform(bool toUndo) {
|
||||
}
|
||||
|
||||
DECLARE_POINTER_TYPE(SinglePointRemoveAction);
|
||||
DECLARE_TYPEOF_COLLECTION(SinglePointRemoveActionP);
|
||||
|
||||
|
||||
// Remove a set of points from a symbol part.
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <data/field.hpp>
|
||||
#include <util/error.hpp>
|
||||
|
||||
DECLARE_TYPEOF_COLLECTION(FieldP);
|
||||
|
||||
// ----------------------------------------------------------------------------- : Card
|
||||
|
||||
IMPLEMENT_DYNAMIC_ARG(Game*, game_for_new_cards, nullptr);
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
#include <util/dynamic_arg.hpp>
|
||||
|
||||
class Game;
|
||||
#ifndef HEADER_DATA_GAME
|
||||
DECLARE_POINTER_TYPE(Field);
|
||||
#endif
|
||||
DECLARE_POINTER_TYPE(Value);
|
||||
DECLARE_POINTER_TYPE(CardStyle);
|
||||
|
||||
|
||||
@@ -9,3 +9,7 @@
|
||||
#include <data/game.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- : Game
|
||||
|
||||
bool Game::isMagic() const {
|
||||
return name() == _("magic");
|
||||
}
|
||||
+5
-1
@@ -10,6 +10,7 @@
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <util/io/package.hpp>
|
||||
|
||||
#ifndef HEADER_DATA_CARD
|
||||
DECLARE_POINTER_TYPE(Field);
|
||||
@@ -17,12 +18,15 @@ DECLARE_POINTER_TYPE(Field);
|
||||
|
||||
// ----------------------------------------------------------------------------- : Game
|
||||
|
||||
class Game {
|
||||
class Game : public Packaged {
|
||||
public:
|
||||
String fullName;
|
||||
String iconFilename;
|
||||
vector<FieldP> setFields;
|
||||
vector<FieldP> cardFields;
|
||||
|
||||
// Is this Magic the Gathering?
|
||||
bool isMagic() const;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
+5
-2
@@ -12,6 +12,7 @@
|
||||
#include <util/prec.hpp>
|
||||
#include <util/reflect.hpp>
|
||||
#include <util/action_stack.hpp>
|
||||
#include <util/io/package.hpp>
|
||||
|
||||
DECLARE_POINTER_TYPE(Card);
|
||||
DECLARE_POINTER_TYPE(Set);
|
||||
@@ -20,7 +21,7 @@ DECLARE_POINTER_TYPE(Game);
|
||||
// ----------------------------------------------------------------------------- : Set
|
||||
|
||||
/// A set of cards
|
||||
class Set {
|
||||
class Set : public Packaged {
|
||||
public:
|
||||
/// The game this set uses
|
||||
GameP game;
|
||||
@@ -52,8 +53,10 @@ class SetView : public ActionListener {
|
||||
/// The set that is currently being viewed, should not be modified directly!
|
||||
SetP set;
|
||||
|
||||
/// Called when another set is being viewn (using setSet)
|
||||
/// Called when another set is being viewed (using setSet)
|
||||
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 <gfx/bezier.hpp>
|
||||
|
||||
DECLARE_TYPEOF_COLLECTION(SymbolPartP);
|
||||
DECLARE_TYPEOF_COLLECTION(ControlPointP);
|
||||
|
||||
// ----------------------------------------------------------------------------- : ControlPoint
|
||||
|
||||
IMPLEMENT_REFLECTION_ENUM(LockMode) {
|
||||
|
||||
@@ -322,15 +322,33 @@
|
||||
<Filter
|
||||
Name="set"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\gui\set\cards_panel.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gui\set\cards_panel.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gui\set\panel.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gui\set\set_info_panel.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gui\set\set_info_panel.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gui\set\stats_panel.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gui\set\stats_panel.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gui\set\style_panel.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gui\set\style_panel.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gui\set\window.cpp">
|
||||
</File>
|
||||
@@ -558,6 +576,12 @@
|
||||
<File
|
||||
RelativePath=".\data\set.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\data\settings.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\data\settings.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\data\symbol.cpp">
|
||||
<FileConfiguration
|
||||
@@ -616,6 +640,34 @@
|
||||
RelativePath=".\data\action\symbol_part.hpp">
|
||||
</File>
|
||||
</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
|
||||
Name="util"
|
||||
|
||||
Reference in New Issue
Block a user