Twan van Laarhoven
c324c8bbbb
to_code now adds quotes around strings.
...
to_code for map now includes keys.
This maans that the basic script-functions test passes.
2020-04-26 17:35:14 +02:00
Twan van Laarhoven
2e897edbbf
Use toSomeType() instead of operator SomeType in ScriptValue.
...
This means that we are more explicit about type conversions.
Also use override specifiers for overriden virtual functions in ScriptValue.
2020-04-26 17:03:43 +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
4327abb803
Remove DECLARE_TYPEOF
...
It is no longer needed since C++11
2020-04-26 00:51:16 +02:00
Twan van Laarhoven
5e92d9455c
Code cleanup: remove messy spaces before line continuation (\) in macros
2020-04-26 00:37:13 +02:00
Twan van Laarhoven
7d06e903a4
Rename script function rotate -> rotate_image
2020-04-25 23:46:30 +02:00
Twan van Laarhoven
37c8641641
Replace scoped_ptr by unique_ptr
2020-04-25 22:28:32 +02:00
Twan van Laarhoven
787a707900
Use std::shuffle instead of std::random_shuffle, since the latter is removed in C++17
2020-04-25 22:20:51 +02:00
Twan van Laarhoven
0d42df1537
Fix type conversion errors in GCC/wxGTK
2020-04-25 22:20:51 +02:00
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
4258ce1c6c
Remove AColor class, because wxColour now supports alpha values.
2020-04-25 22:20:50 +02:00
Twan van Laarhoven
8f8e2cea65
Expose the 'warning' function, and added a similar 'error' function.
...
Add documentation.
2020-04-23 20:22:43 +02:00
Twan van Laarhoven
bad896898f
Don't throw Char*
2020-04-23 19:56:46 +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
a6cd6c2dd0
Spelling of canonical
2020-04-21 21:48:47 +02:00
Twan van Laarhoven
59d59e97fd
fixed: write_image_file failed with --export with relative path, because the is-relative-to-target-dir check was wrong
2020-04-21 00:13:23 +02:00
Twan van Laarhoven
b283a02d2f
to_code and to color conversion for ScriptNil
2020-04-20 22:45:20 +02:00
Twan van Laarhoven
b0180547ae
Fix Regex::replace_all to actually do something
2020-04-20 21:19:09 +02:00
Twan van Laarhoven
24f4b4edba
Add type_name function to query the type of a value
2020-04-18 22:03:25 +02:00
Twan van Laarhoven
332f7b9ed8
getContext() clears "card" from the context
2020-04-18 21:34:31 +02:00
Twan van Laarhoven
9c9eba77a0
Fix: substr("foo",begin:3) now returns "" instead of true
2020-04-18 19:34:32 +02:00
Twan van Laarhoven
3b4f3a948c
Fix: length now works correctly for maps
2020-04-18 19:32:25 +02:00
Twan van Laarhoven
0d38c64e86
Fix parsing issues on linux: iswalpha and friends don't work correctly on non-ascii characters.
2020-04-18 01:01:57 +02:00
Twan van Laarhoven
0cffdb7d1a
move reverse_string to string.hpp
2020-04-14 20:27:39 +02:00
Twan van Laarhoven
6e7a4485a8
Cleaned up utf8 decoding code.
...
It was actually completely broken in newer wxWidgets versions, putting '\0' characters in the string, which broke things like concatenation.
2020-04-08 01:24:19 +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
Lymia Aluysia
8c960f0c34
Work on compiling on mingw
2017-01-18 04:56:16 -06:00
twanvl
262b684469
don't warn about \' escape sequence.
...
added numeric escapes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1643 0fc631ac-6414-0410-93d0-97cfa31319b6
2011-01-25 22:42:54 +00:00
twanvl
bd55326c7d
* Added console panel for evaluating scripts and showing error messages.
...
* Rewrite of error queue code: errors are now pulled, instead of being turned into messageboxes automatically.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1629 0fc631ac-6414-0410-93d0-97cfa31319b6
2011-01-21 13:26:03 +00: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
b47bb7c3fe
added some math script functions:
...
* sin, cos, tan (radians)
* sin_deg, cos_deg, tan_deg (degrees)
* exp, log (base e), log10
* sqrt, pow
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1602 0fc631ac-6414-0410-93d0-97cfa31319b6
2011-01-08 22:15:54 +00:00
twanvl
195a318001
compatibility with wxWdigets 2.9+: use wxString::const_iterator instead of raw Char*
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1526 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-12-07 21:02:04 +00:00
twanvl
9735e24517
Added a panel showing profiler timings
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1523 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-10-13 21:35:30 +00:00
twanvl
13a051b967
Fix error in vc9: don't index outside vector
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1512 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-10-03 15:28:12 +00:00
twanvl
968f557511
recolor_image function can now be used with custom colors
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1477 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-03 18:44:44 +00:00
twanvl
4defd52aa2
allow reading images from the current directory in the CLI interface
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1475 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-03 18:25:35 +00:00
twanvl
e01b24aa63
Added 'recolor_image' function
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1473 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-03 18:19:05 +00:00
twanvl
ca0e762b64
New image functions:
...
* invert
* flip_horizontal
* flip_vertical
* rotate
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1472 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-03 14:56:45 +00:00
twanvl
0625cd0aff
Short-circuiting "and" and "or" operators
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1461 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-23 23:52:34 +00:00
twanvl
f7ae4b5a7b
in_tag function now looks for a positive number of tag occurrences.
...
In particular: in "<tag><tag></tag>x</tag>" the x is now in_tag.
This fixes the rest of #20 .
Also added is_in_tag function that returns a bool instead of the tag position.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1456 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-21 22:42:46 +00:00
twanvl
4bdd0d5c01
perhaps "orelse" is better syntax then "or else"?
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1445 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-21 16:50:39 +00:00
twanvl
a6198ddf1b
correct scope handling for closures, this was broken after the change to not make calls open a scope.
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1444 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-21 16:35:23 +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
twanvl
8800500d86
minor code formating things
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1442 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-21 13:29:20 +00:00
coppro
80f815b9ce
Make to_title work correctly; patch thanks to Shiv2503.
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1440 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-04-14 22:33:43 +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