Commit Graph

70 Commits

Author SHA1 Message Date
Twan van Laarhoven 64ea1d7322 Clean up pointer use:
* Use unique_ptr for Actions instead of manual memory management
 * Use unique_ptr in KeywordDatabase
 * Use unique_ptr instead of shared_ptr for file formats
 * Don't pass shared_ptr to Reader/Writer, use references instead
Also
 * Switch to C++17 so we can use map::try_emplace
2020-04-25 22:20:51 +02:00
Twan van Laarhoven 708b4389a0 Use make_intrusive/make_shared for smart pointer construction. 2020-04-25 22:20:51 +02:00
Twan van Laarhoven 713a9e4a40 Use underscores instead of spaces for all internal names. And renamed some script functions at the same time.
* cannocial_name_form now outputs "_", where it used to use " "
* this simplifies reflectio and scripting code, because now C++ names are also MSE internal names
* added 'caption' property to fields. This is used instead of the name in NativeLookEditor, since the latter will now contain underscores.
* renamed text related script functions for consistency, since we were touching that part of the code anyway.
2020-04-22 23:48:26 +02:00
Twan van Laarhoven 332f7b9ed8 getContext() clears "card" from the context 2020-04-18 21:34:31 +02:00
Lymia Aluysia 1d912a6853 Update copyright strings. 2017-01-18 08:52:57 -06:00
Lymia Aluysia d2c635f739 Change tabs to two spaces. 2017-01-18 08:43:21 -06:00
twanvl 4532fade77 Removed old random pack code. It was already disabled by the USE_NEW_PACK_SYSTEM flag.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1482 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-04 15:48:42 +00:00
twanvl f8c7961c03 trim filenames, apparently writing a file "some card " is not possible on windows, it drops the trailing space.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1448 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-21 18:06:54 +00:00
twanvl 51dfed69b4 Instead of the new_intrusive<T>() functions, use intrusive(new T)
This means we no longer need 8 different functions for different numbers of arguments, and non-const references can now also be passed to constructors without problems.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1443 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-21 14:32:28 +00:00
coppro 85854b1bd2 Fix warnings
Semi-fix bug #6 (does not work if the zipfile was loaded from a directory)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1439 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-03-04 01:46:04 +00:00
coppro cf91f9c43b Update copryright date to 2010.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1438 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-03-01 23:33:25 +00:00
coppro f2d6714da9 (sorry for making this all one commit)
Fiddled with the backbone for scripts some more.
VCS are now suppported in sets but configuration/non-svn-systems missing
Linux build now uses precompiled headers (build time--)
A couple warning fixes too.


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1427 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-09-16 23:40:44 +00:00
coppro a44025b015 Removed function leftover from half-way through development
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1389 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-06-19 03:28:25 +00:00
coppro b73f081b60 Updated copyright information (2009 + my real name)
MSE now handles opening more gracefully - can handle directories and failures
Changed behavior to always save cards to separate files with intent to add VCS later (note: shouldn't do this for zip, but can't see a good way to approach this)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1388 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-06-19 03:09:05 +00:00
coppro 4c9f3afb05 MSE can now save cards in separate files (needs manual config editing still).
Trailing slashes are stripped from commandline arguments (because directory.mse-set/ should be accepted)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1386 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-06-18 02:18:23 +00:00
coppro 30671ad5b0 Fixed a bunch of linker errors preventing optimized compile on Linux.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1352 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-01-14 19:13:05 +00:00
twanvl e3cdb2bea7 adding & editing custom pack types now works.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1328 0fc631ac-6414-0410-93d0-97cfa31319b6
2009-01-10 01:37:03 +00:00
twanvl 44a779222d profiling of order cache
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1240 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-12-11 15:11:55 +00:00
twanvl ee9060077b Fixed conversion bug in position_of function;
to_real no longer needs to throw exceptions when conversion fails

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1086 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-07 19:39:06 +00:00
twanvl 64b7912835 Incremented version number to 0.3.7
When saving files an older version number is used if that version of MSE would be able to open the set

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1011 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-28 16:31:40 +00:00
coppro 26562e03e3 Updated copyright information - added my name and also changed 2007 to 2008
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@837 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-04-06 18:16:32 +00:00
twanvl 3ceec52c1c - no longer try to draw fields with huge or negative size
- download icons of packages

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@799 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-29 23:51:19 +00:00
twanvl eed8ba4274 PACKAGE_INSTALL now stands for both installation and upgrades
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@795 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-29 20:46:00 +00:00
twanvl d2196eea09 Finally got precompiled headers to work.
Now all C++ files need to #include <util/prec.hpp>
 That is why all .cpp files are touched by this commit

Many changes to installers and update checking:
     - the window is now called PackagesWindow, in a new source file
     - update checking is now independent from the PackagesWindow. For update checking only a list of package versions are needed (vector<PackageDependency>). This is much less information to download at each startup.
     - the list of available packages is now a list of available Installers, since an installer can contain multiple packages.
     - moved the logic of dependency checking etc. to data/installer
     - moved the actual installation to util/io/package_manager
     - moved directory iteration/creation logic to util/file_utils
     - added PackageDirectory: the local and global package directory now have their own object (was part of PackageManager)
     - added PackageVersion: for detecting if a package has been modified after it was installed.
     - added PackageDescription: description/header of a package. Basicly the same as what Packaged provides.
     - added DownloadableInstaller: where to find an insaller, what does it contain?
     - added InstallablePackage: brining it all together: installer, package, status, action.

Current status: the insaller is currently broken in a few places, more on that soon.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@792 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-29 18:30:41 +00:00
twanvl bdc1e12e95 Added <prefix> and <suffix> tags;
Added prefix and suffix support to combined_editor;
'always symbol' now checks if the symbols are available in the symbol font;
Fixed parser bug in spec_sort;
A first information field is no longer used as set identification

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@653 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-01 19:56:43 +00:00
twanvl 8833d07c4a Added 'filter' support to position function; Made sure sort script can depend on the value of the field itself.
Cleaned up some things, why is a blank image not thread safe?

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@548 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-10 18:57:41 +00:00
twanvl 1646aebc88 Added identifying field to set, show set name in window title.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@519 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-07 14:53:24 +00:00
twanvl b3d04fe192 Scripts depending on content_something are re-updating after updating the content properties
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@480 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-04 17:15:08 +00:00
twanvl f0628317a3 Added clone() function to Value.
Added support for per-card styling

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@430 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-24 01:30:34 +00:00
twanvl e46cbe66b2 Cleaned up Set::Styling/Card::Styling by spliting that functionality into a 'DelayedIndexMaps' class;
Added 'right' and 'bottom' properties to style as an alternative way of specifying width/height;
Added content_width, content_height and content_lines properties that give feedback on text rendering;
Always show warnings when showing errors and vice-versa, this prevents script errors from appearing before the reader/parse error that caused them;
Finally some preliminairy work on export templates

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@428 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-22 23:12:41 +00:00
twanvl 4a6e10ad93 Support for extra card fields in stylesheets;
Fixed some bugs:
 - Missing choice images can crash mse.
 - The wrong style is used for making preview choice images on style panel.
FOR_EACH(x, *y.z) should now work without parentheses on linux as well.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@389 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-18 21:26:21 +00:00
twanvl ee6f0b9df7 Delayed updating of scripts on keyword changes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@383 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-15 16:43:13 +00:00
twanvl 33fd2b5e18 default smart pointer type switched to intrusive_ptr
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@337 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-11 21:34:53 +00:00
twanvl e38cc6e2c9 Fixed dependencies for 'styling';
Fixed: specific character prefered over .* for keywords

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@306 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-04-28 21:58:29 +00:00
twanvl a2e709d86b It is 2007 by now
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@275 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-04-21 17:06:29 +00:00
twanvl 99f44292d6 enlgish language stuff for keywords
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@264 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-04-18 21:33:32 +00:00
twanvl dcfee659d0 Added some REFLECT_ macros, so the reflection code doesn't have to mess with the internals of reflection.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@218 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-18 22:45:02 +00:00
twanvl 0464f5f7fc The DECLARE_TYPEOF(()) calls don't work in MSVC, I changed it to use a COMMA macro instead of ,
If this doesn't work in GCC, the COMMA definition could be made only for MSVC, then GCC sees DECLARE_TYPEOF(map<int COMMA string>). GCC doesn't need DECLARE_TYPEOF anyway.

Keyword expansion now works, still todo:
 - marking parameters, e.g. "Cycling 2W" -> "Cycling <param-mana>2W</param-mana>"
 - user interface for toggling reminder text
 - user interface for keywords

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@210 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-17 23:58:16 +00:00
coppro 83b6aa36f8 Removed DECLARE_TYPEOF2; replaced with double-parenthesized macro calls. (GCC doesn't accept the other way in all cases.. I don't know whether MSW accepts this way.) Fixed a few resource names.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@209 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-15 23:48:01 +00:00
twanvl e83c00c05a Changed scroll size of PackageList;
Added 'collapse' option for card notes;
Made variant of  DECLARE_TYPEOF for maps (two template arguments).

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@202 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-02-08 22:15:11 +00:00
twanvl 315af1f14a Changes to make it work in windows again;
New header util/platform.hpp for platform specific stuff that doesn't go elsewhere;
Changed resource names from "CURSOR_SOMETHING" to "cursor/something", so it matches the filenames (in progress for other resource types).

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@190 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-01-30 17:27:25 +00:00
twanvl 3d9181e5f6 Eliminated most build errors (gcc,linux,wxGTK).
What is left is mostly:
 - warning: converting double to int
     -> add a cast/to_int or ignore
 - wrong initialization order in ctor
     -> just swap the order to match the class
 - errors about wxCursors
     -> add a function loadResourceCursor


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@183 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-01-29 00:04:20 +00:00
twanvl 439dbfce6b rewritten retrying part of reader, it is now implemented how it should have been from the start.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@175 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-25 16:52:07 +00:00
twanvl 5bed5892f3 thumbnails for choice editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@159 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-23 21:12:26 +00:00
twanvl cf39deec24 combined_editor function, and improved dependency handling (removing duplicates), viewer refreshes on events from script manager
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@147 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-22 19:05:52 +00:00
twanvl 20f5c127f8 set.validate() used for adding initial card to a set
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@142 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-22 13:51:24 +00:00
twanvl 2ba1d0b1b8 events on script update; fix in cycle_sort; card list updated on value action
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@136 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-21 21:56:49 +00:00
twanvl e8f580b691 cards dependencies, clearing order cache
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@134 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-21 19:54:18 +00:00
twanvl 4c10107dbb Thread for generating thumbnail images;
Used for card list;
Implemented reordering from card list

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@115 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-18 19:30:44 +00:00
twanvl ca42f31ccc Localisation, using Locale class
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@113 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-12 16:09:05 +00:00