Commit Graph

33 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 35a89676b4 CMake file
Update to C++ 11: std::shared_ptr, for each loops
Update to wxWidgets 3.0+
2020-04-08 01:10:01 +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 53bbcfe9a9 Be explicit about type of angles: either Radians or Degrees.
Angles are always doubles.
Internally use radians as much as possible.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1605 0fc631ac-6414-0410-93d0-97cfa31319b6
2011-01-09 14:49:59 +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 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 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
twanvl ce906e83f8 Cleaned up the calculation of bounds of symbols, this fixes bounds calculation with symmetries.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1178 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-27 23:46:31 +00:00
twanvl ae14784fd6 Reduce coupling between ValueEditors/Viewers and Set and StyleSheet.
- Adding of actions is done with an addAction function
 - Files are read from
     - getStylePackage for styling stuff (this is stylesheet)
     - getLocalPackage for symbol and image values (this was the set)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@970 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-04 00:21:06 +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 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 b79f52db84 New rotation system (see forum thread).
Major changes:
  - when rotating, the top left corner of the rectangle stays in place.
  - ValueViewers get a dc that is pre-rotated/translated for them, i.e. (0,0) is the top-left of the viewer (with ValueViewer::getRotation).
  - moved 'angle' from individual Styles to the Style base class.
  - any rotation angle is now possible. angle is still an int for now.

This warrants a version bump

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@782 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-23 21:58:58 +00:00
twanvl c7d31ddb4a Implemented selection using rectangles in symbol editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@535 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-09 21:19:59 +00:00
twanvl b409188013 Symbol editor now has constraints on selection, but part list allows selection inside groups.
Added logical 'xor' operator for scripting.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@534 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-09 20:43:16 +00:00
twanvl d00b09eb60 New symbol part list control that shows previews and has a built in editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@529 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-08 22:26:39 +00:00
twanvl b18dea0f69 Movement of objects with the arrow keys in symbol editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@527 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-08 13:48:53 +00:00
twanvl b46d979f9e Added the necessery classes to handle symmetry objects/mirrors in symbols; What used to be SymbolPart is now SymbolShape, SymbolPart is a base class.
This should also pave the way for grouping.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@526 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-08 01:12:55 +00:00
coppro 9c67a4fa78 Implemented difference (XOR) option for symbols.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@410 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-22 02:31:17 +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 21781a559a localization of symbol editor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@227 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-22 14:27:55 +00:00
twanvl 0c66191ab3 Changed all resources to .png files;
Added 'snap to grid' to symbol editor

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@207 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-02-16 00:07:14 +00:00
twanvl b93e5b2ae3 Reverted resource references for combine_something, you can't use tool_image here, because on MSW that only works for .bmps'
Added dependency stuff to invalidate Choice images;
Fixed 'duplicate' in symbol editor

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@197 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-02-07 16:17:15 +00:00
coppro 3c4790cac9 Fixed many resource file names, removed raw-char matches input-char requirement for Linux operation.
WARNING: This version is unstable. High possibility of encountering a complete processor lockup (likely an infinite loop).

Known bugs on Linux: Some fields are being drawn off-target (such as text) and they need to be fixed in order to allow compatibility. Different style files on different platforms would not be a good idea. The combined-editors are not working. When a text-replacement is made via "~", the cursor is placed before it and attempting to remove or select it causes a lockup. Symbol editor seems to be working fine. The symbol selection dialog causes a crash when used.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@194 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-02-02 04:23:35 +00:00
twanvl 51546ca2d8 Changed resource names to be lowercase, and to match the filenames (or what they should be);
Replaced all direct construction of bitmaps and icons using wxBitmap("name") with load_resource_* calls.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@191 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-01-30 18:29:02 +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
coppro 28bcb1068c Compiled Linux version. The welcome screen doesn't display the icon images, and the buttons don't work. Data is found at *prefix*/Magic Set Editor/data and the images at *prefix*/Magic Set Editor/resource. On Ubuntu, *prefix* is /usr/local/share. Resource files are all the image files from resource. I haven't configured them, because I haven't made it past the welcome screen.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@188 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-01-30 04:03:22 +00:00
twanvl 8ab89a1145 fixed onHandle: now looks at all handles
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@164 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-24 13:53:07 +00:00
twanvl 23abbedcbd implemented clipboard handling for cards
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@83 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-11-20 18:51:11 +00:00
twanvl 9de743030e Switched to a new coding style, which plays nicely with the Reader/Writer. This new style allows REFLECT to be used instead of REFLECT_N in most places.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@15 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-10-11 22:26:55 +00:00
twanvl cdb4ecf031 added SetWindow (formerly MainWindow)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@8 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-10-07 13:11:24 +00:00
twanvl ddfb1a5089 initial checkin of C++ port (in progress)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@2 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-10-01 14:08:07 +00:00