Commit Graph

32 Commits

Author SHA1 Message Date
GenevensiS 66016f381c rewrite image caching logic 2025-12-14 05:33:31 +01:00
Twan van Laarhoven 0c3712b61a Cleanup: indentation of public/protected/private keywords 2020-05-12 21:57:37 +02:00
Twan van Laarhoven e005d47d56 Use std::enable_shared_from_this instead of thisP parameters. 2020-05-06 22:59:10 +02:00
Twan van Laarhoven 54a3cbfde3 Replace include guards by #pragma once 2020-04-26 01:25:16 +02:00
Twan van Laarhoven bad9981ad9 Cleaned up copyright block.
Removed the year so we don't get tempted to change this ever again.
2020-04-26 01:11:14 +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
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 a2af3211a4 Moved mask to Style and mask related drawing to ValueViewer.
Used the same mask also for TextStyles.
To keep the text selectable (since the mask is now also used for containsPoint), the future sight cost masks needed to be updated.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1183 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-30 23:49:12 +00:00
twanvl a183ecc9a6 New class CachedScriptableMask: like CachedScriptableImage, only containing an AlphaMask instead of an Image/Bitmap.
Use CachedScriptableMask for all masks.

TODO: This introduces some duplicate code in ValueViewers that could be fixed by moving mask to the Style base class.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1182 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-30 21:51:38 +00:00
twanvl c6fe6634dd Tweaked the way to use getScript() like functions;
Made condition and default_expand parameters of expand_keywords optional.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1080 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-08-07 01:54:13 +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 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 322e8715fc Fixed: choice images were generated with the wrong context from invalidate()
Choice thumbnails are now checked to not be 'local' before reading from cache, fixes issue with wrong rarity symbol in the drop down list;
Disabled unimplemented menu items;
Multiple choice items for RENDER_LIST are now zoomed, and positioning is on rotated cards is fixed.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@650 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-29 22:52:56 +00:00
twanvl 52ec7b38c0 Images are now cached as wxBitmap, not wxImage. This should improve performance.
Fixed some more corner cases of rotation+zoom.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@630 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-25 21:24:28 +00:00
twanvl e287348843 Added 'or else' construct to script language.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@423 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-14 18:31:47 +00:00
twanvl 27833003c8 The thread safety stuff is only needed for GTK
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@419 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-11 15:46:05 +00:00
coppro c4e340f9e4 Fixed crash with new thread-safety code (primarily on watermarks)
Actually added only showing "open recent set" if exists
Removed a call to deprecated functions.


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@415 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-09 05:10:53 +00:00
coppro 62ff837352 Added thread-safety to thumbnail request system.
Marked symbol requests as not being thread-safe.
Added icon to symbol editor
Made *.* actually register on *



git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@407 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-21 16:11:38 +00:00
twanvl 00b3e3a3cd Conversion to new ScriptableImage complete, this affected quite a bit, including the evil thumbnail thread;
Added StyleListener, so style changes are only propagated to interested viewers.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@329 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-10 00:47:27 +00:00
twanvl 3c4729aaa2 Added 'position hint' to packages, used to specify the order of the packages in a package list;
Added 'pack type', intended for playtesting (random boosters/starters);
Added 'default(_image)' property to ImageStyle, and added the frame fillers for magic;
Added blurring and bold printing (rather hacky) to the text rendering functions (used for "double click to add image" text);
Added 'symmetric overlay' combine mode, which will look really nice for hybrids;
Moved the watermark choices from the game to an include file in magic-watermarks;
Working on a replacement for the image scripting system that plays nicer with the rest of the code. In particular, it will be possible to compare generated images quickly, so they can be updated continuously. This is a work in progress, currently there are two versions of everything.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@327 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-09 21:41:15 +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 f2ce80d88a Split script/functions.cpp into multiple files in new script/functions/ directory.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@217 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-18 22:13:27 +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
twanvl 3cbf2577c1 added native look editor and the set info panel
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@82 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-11-20 17:26:34 +00:00
twanvl 141400d8aa implemented symbol font
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@81 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-11-20 14:48:53 +00:00
twanvl f18bdafab1 made dependency analysis work without errors for magic-new (except for a few script functions); implemented the rest of the ScriptManager
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@71 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-11-01 16:41:50 +00:00
twanvl e2220a5a97 choice images work
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@63 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-10-31 15:15:26 +00:00
twanvl f46b0b6b7b Added ScriptableImage plus the beginnings of dependency stuff
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@58 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-10-29 16:23:31 +00:00