Commit Graph

32 Commits

Author SHA1 Message Date
twanvl 2662f9d4bf Optimize default arguments (@ operator) into script rules.
The plan is to deprecate rule form completely, so instead of replace_rule(match:..) write replace_text@(match: ...)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@987 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-18 19:25:18 +00:00
twanvl d00beeb55f Closure operator now behaves as default argument operator, documentation.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@965 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-03 18:33:17 +00:00
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 6912dfda09 Simplified script VM:
- removed I_RET instruction, return is now implicit at end of script
 - I_POP is not a binary instruction.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@963 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-06-03 14:08:11 +00:00
twanvl 1b516e781f Script support for AColors. All colors in script related code are now AColor.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@852 0fc631ac-6414-0410-93d0-97cfa31319b6
2008-05-16 20:51:16 +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 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
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 d4af90505a Type name of ScriptObjects is now reported as the actual object type (card/set/value/etc.);
Back trace is slightly smarter
Removed move_cursor_with_sort

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@542 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-10 14:39:28 +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
coppro dd6c40febf Compatibility update (escaped trigraphs) (yay for unused standard features)
Used real casting in ChoiceThumbnailRequest (can now bactrace card list errors properly)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@509 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-06 17:30:26 +00:00
twanvl 4ca572a29f Added min and max script pseudo-functions
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@497 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-05 23:55:31 +00:00
twanvl 86393f33dc Fixed bug in script parser/compiler: "x[if a then b else c]" was incorrectly optimized;
Sciript parse errors in include files now get reported for the right file and line number.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@458 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-07-01 18:11:48 +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
twanvl 2868e014cf Script errors now have information on where the error occureed (what value);
Script operator "int + object" now uses string concatenation instead of converting the object to integer;
Html export window uses a dummy set for editing options, so we don't pollute the set's undo stack;
Choice rendererer in nativelook 'both' style always leaves room for the icon;
Version bump

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@438 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-27 12:18:54 +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 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 40e55e8151 scripting language now has support for list and map literals: " [a,b,c] "
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@422 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-06-14 14:25:53 +00:00
twanvl 67e049161f == and != default to strings instead of ints
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@331 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-05-10 16:26:21 +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 9052636ff9 Addded script functions for exporting, ExportTemplate package type
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@220 0fc631ac-6414-0410-93d0-97cfa31319b6
2007-03-20 17:21:08 +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 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
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 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 e2544e9d53 implemented resampled text ("high quality")
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@87 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-11-22 20:23:28 +00:00
twanvl ce6a83e34b Basic text rendering working;
Added Font (done) and SymbolFont (skeleton);
Added styling to set;
Added CountourMap;
Some script fixes

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@73 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-11-17 17:57:04 +00:00
twanvl 5ee944e426 naming style (variable_to_string); nicer error messages for problems during dependency checking
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@67 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-10-31 16:06:17 +00:00
twanvl 1ffaa5bd58 made a start with script functions
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@62 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-10-31 12:17:36 +00:00
twanvl c0e8417189 Added scripting support; not yet integrated with the rest of the app.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@13 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-10-09 20:23:53 +00:00