Commit Graph

157 Commits

Author SHA1 Message Date
twanvl c5159ebcf7 "div" operator for integer division,
Added parser support for closure operator fun@(args)
Use equal() function for all script comparisons, better support for deciding when to use strings and when to use pointers equality.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@964 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-03 16:38:33 +00:00
twanvl 97ccf34dce Slightly more information on script errors in keyword reminder text
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@930 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-01 00:50:51 +00:00
twanvl 8d6af1d37a Fixed some bugs from last commit (typo in SCRIPT_PARAM_DEFAULT_C definition)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@858 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-05-18 17:53:44 +00:00
twanvl 1a7e689e95 Added break_text function
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@857 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-05-18 17:27:44 +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
coppro 60b1bb0489 Fixed that stupid user-made keyword precedence bug.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@828 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-02-10 02:14:15 +00:00
twanvl 796975bd9d Added saturate script function (+documentation), it also desaturates
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@800 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-30 00:48:39 +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 4405863485 Added caching to filter_text script function
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@786 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-26 17:43:17 +00:00
twanvl 547a48b98d - Optimization: common parameters to built in functions are no longer looked up as a string at each call, instead their integer ids are global constants
- Optimization: some other minor tweaks.
 - Nicer --help message

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@783 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-12-24 02:04:45 +00:00
coppro dd656ba1bd Fixed "regex escape" function, and updated a script that needed it.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@762 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-30 14:37:18 +00:00
twanvl 458062fa37 Spelling: availAble;
Added information about what parameter an error occured in;
Conversion to string no longer results in [[typeName()]], it gives an error instead.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@721 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-20 21:52:26 +00:00
twanvl e4f9bf1eac Fixed: "X time counter(s)" for suspend keyword, caused by not adding number hints for non-numeric things;
No longer request thumbnails of missing images

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@714 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-09-20 17:54:10 +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 fcc89b64d6 Added support for scripts to determine word lists;
Added 'trim' and 'remove_tags' script functions;
Simplified safety improvements of locale checker;
Added 'is_targeted' function to magic game to replace the contains(..) calls

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@635 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-28 18:33:38 +00:00
twanvl 61136d79a8 Added regex_escape script function (was already used by keyword code);
Added icons for 'sort special rarity' choice.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@625 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-24 20:24:10 +00:00
twanvl d68f73edfc Various tweaks and fixes, mostly to the drop down lists
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@620 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-23 23:29:20 +00:00
twanvl dc9f08b311 Some tweaks to word drop down list
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@619 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-23 17:37:44 +00:00
twanvl 9f2b30b2db Added word lists for choosing things like card type;
Added 'in_place' pattern to spec_sort

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@616 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-23 16:33:12 +00:00
twanvl a112f885ca Moved spec_sort to separate file, added more advanced options;
Split 'sort' script function into 'sort_text' and 'sort_list';
Double clicking card in stats panel switches to cards panel

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@587 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-08-01 18:34:24 +00:00
coppro a75366234f Added crop image function.
Fixed 'difference' symbol type.


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@574 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-14 03:16:45 +00:00
twanvl d590819762 Removed last of the BeginDrawing/EndDrawing calls;
Added english_number_ordinal script function;
Working on symbols with a different aspect ratio (i.e. wider/smaller symbols)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@558 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-12 17:01:07 +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 43d92a5ce7 Keyword usage can now be used for statistics
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@517 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-07 01:39:08 +00:00
twanvl 86235dfc91 Fixed undo issue for combined editor;
Added keyword usage statistics

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@516 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-07 00:55:27 +00:00
twanvl 801dc3db39 Added functions for blurring and scaling images and changing the alpha value
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@494 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-05 21:58:09 +00:00
twanvl c52dfe4f1d Fixed font size of code in keywords tab;
Added 'recursive' flag to replace_rule function

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@487 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-05 14:44:24 +00:00
twanvl b91dd379cf Fixed curly quotes after parenthesis: ("
Font size is now independent of screen DPI, at least on windows

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@478 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-04 14:50:44 +00:00
twanvl 35ec0ce63d Added "width= and height=" to symbols exported to html;
Added a backtrace function to the script evaluator, error messages now include a 'stack trace' of functions that were called.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@446 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-29 19:44:42 +00:00
coppro 14b68de6cb Added "AE" filter to flavor text. Allowed nesting of curly quotes.
Also compatibility update.


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@445 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-29 18:36:45 +00:00
twanvl 31b7380d99 Implemented exporting symbol fonts;
Rendering symbols to an image always uses anti-aliassing (by downsampling from a large size);
Finished the spoiler export template;
Added <soft-line> tag to make line breaks use the line height for soft line breaks

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@440 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-27 18:58:43 +00:00
twanvl 11b8242816 Implemented export functions;
Choice viewer uses font when rendering text.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@433 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-25 20:40:22 +00:00
twanvl 5c6cb41458 implemented html export (only for writing the main file, not the write_file functions);
fixed parser bug: (...\n...) was not parsed as a statement separator if the second ... starts with a string or number


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@432 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-25 16:31:09 +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 97e0e8d6d6 Choice rendering now uses "style.image()" instead of "style.choice_images[value]";
Added script functions for working with multiple choice values;
Added in_context support for filter_rule;
Optimized toUpper/toLower because they are slow on windows (they use thread local storage and mutexes)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@427 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-17 13:13:56 +00:00
twanvl 6e55175f51 Fixed: < was matched by spec_sort "<xyz>"
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@421 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-14 14:24:49 +00:00
twanvl 8b11433cbd Reader now warns about invalid UTF-8 files;
Fixed possible hang when reading multiline strings with incorrect indentation;
Warnings from reading are shown also in NewSetWindow;
Script parse errors get reported with the correct line number;

Added support for showing multiple choice fields as a single image;
Added 'line_below' to ChoiceField::Choice, for putting a line below menu items.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@420 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-12 19:35:24 +00:00
coppro 06138ee325 Made spec_sort specifications featuring more than one '()' not hang.
Added error window if a script error occurs while loading a set.


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@412 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-23 00:47:18 +00:00
twanvl f21f11ac87 Support for automatic curly quotes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@375 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-14 18:24:01 +00:00
twanvl 04366b3505 Fixed: custom keywords not immediatly active;
Version bump;
Moved the busy cursor to actual loading of set;

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@364 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-13 23:55:37 +00:00
twanvl ff745244d3 choice fields show only the highest level of choices in statistics panel
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@361 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-13 22:23:38 +00:00
twanvl 6ef60ed15f Icons for export and print;
match_rule script function

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@356 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-13 17:27:25 +00:00
twanvl 3b45bb81f6 Support for 2d bar graphs;
separator_after for keywords;
Slightly more advanced english_plural/singular;
Windows uninstaller will remove app data

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@348 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-13 01:22:11 +00:00
twanvl 2d48f27fe0 Added support for separators that are part of a parameter;
Keywords match whole words only;
Added english_singular/plural functions;
Fixed possible infinite loop in reader

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@347 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-12 20:17:49 +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 3b6743b110 Added support for custom colors for graphs;
Moved 'choice colors' from styel to field, split into 'choice colors' and 'choice colors cardlist';
Added support for pie graphs (no gui to use them, though);
Fixed bugs caused by selecting a card before the set was changed on all panels.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@336 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-11 14:10:29 +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 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
coppro 7c40df0624 Updated a few GCC issues, and case-sensitivity of filenames.
I had to rename the export function in Apprentice.cpp since "export" is a reserved word according to the C++ standard. I don't know whether GCC supports it yet, but it certainly complains.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@302 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-04-25 00:16:29 +00:00