guy
516f36a9d2
Added changes for building on Catalina
2020-06-15 00:23:33 -04:00
Twan van Laarhoven
c9c708dfbe
Fix #63 : don't use reference arguments in openFileInPackage
2020-05-27 22:16:48 +02:00
Twan van Laarhoven
22b1c2604b
Remove reader_pragma_handler hack
2020-05-22 01:23:53 +02:00
Twan van Laarhoven
173f702ffa
Warn about missing ':' in reader
2020-05-22 01:20:48 +02:00
Twan van Laarhoven
cbab6481a1
When reading, don't add items to a vector before they are read. This avoids nullptrs in the list of fields, cards, etc. when exceptions are thrown
2020-05-22 00:25:55 +02:00
Twan van Laarhoven
749de23eb0
Fix error when using saveAs
2020-05-22 00:25:35 +02:00
Twan van Laarhoven
1bb61ea9ac
Fix gcc build
2020-05-21 19:53:56 +02:00
Twan van Laarhoven
1a0e17221b
Added StringView type (similar to std::string_view)
2020-05-21 19:29:42 +02:00
Twan van Laarhoven
6b6306fc86
Don't use wxMkDir, it shows stupid error messages
2020-05-16 20:12:04 +02:00
Twan van Laarhoven
5deaeeeb3e
Cleanup: use override specifier everywhere, and enable gcc warning to check for it.
2020-05-16 00:23:18 +02:00
Twan van Laarhoven
0c3712b61a
Cleanup: indentation of public/protected/private keywords
2020-05-12 21:57:37 +02:00
Twan van Laarhoven
7cf5531efd
Fix #31
2020-05-11 21:36:22 +02:00
Twan van Laarhoven
b57d9b7615
Enable 64 bit static build and fix linker error
2020-05-11 01:54:21 +02:00
Twan van Laarhoven
0a0dd72e36
Fix null dereference when stylesheets are missing, added an error message
2020-05-09 13:33:41 +02:00
Twan van Laarhoven
968b8eabca
Add "Save as directory"
2020-05-09 13:26:33 +02:00
Twan van Laarhoven
8b25815f72
Re-enabled intrusive_ptr
2020-05-07 22:25:02 +02:00
Twan van Laarhoven
6434532dfb
GetMember is not reading. So don't try to fix-up "read" data when getting a member.
...
Fixes #3
2020-05-05 23:11:24 +02:00
Twan van Laarhoven
6edba0c5c0
Move buffering to Reader
2020-05-02 01:04:35 +02:00
Twan van Laarhoven
a1d54f36fc
Use LocalFileName class for file names inside a package.
2020-04-30 00:20:32 +02:00
Twan van Laarhoven
d64dee7834
Fix: images were not being loaded from zip files.
...
wxImage::LoadFile requires the file to be seekable to peek at the header.
We work around this by buffering the header in a wrapper class.
2020-04-28 22:46:34 +02:00
Twan van Laarhoven
5f615b3117
Fix #5 . Use our own function instead of wxRemoveFile, because the latter shows an error when the file doesn't exist.
2020-04-28 21:25:05 +02:00
Twan van Laarhoven
f4b2a4316f
Fix: don't run after_reading multiple times when there are included files
2020-04-27 14:23:26 +02:00
Twan van Laarhoven
42b7cf52b8
Don't write keys in canonical_name_form
2020-04-26 15:42:01 +02:00
Twan van Laarhoven
40d78edf0f
Cleaned up the reflection code a bit
...
* Renamed 'tag' variable to 'handler'
* Removed addAlias stuff, instead check for matching names with if statements
* Added after_reading function that is called by Reader after reading a complete object. This generalizes Packaged::validate, which is now also called via this mechanism.
* Removed some backwards compatibility with <0.3.0 for templates
2020-04-26 15:33:59 +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
37c8641641
Replace scoped_ptr by unique_ptr
2020-04-25 22:28:32 +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
a585fc40cc
Remove some useless "typedef wxX X"
2020-04-22 23:58:01 +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
cbf1251f8c
Fix more gcc warnings
2020-04-16 01:03:10 +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
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
f9e8bb88e3
profile package open timing
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1541 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-12-07 21:14:10 +00:00
twanvl
3562891b42
compatibility with wxWdigets 2.9+: there is now a built in wxString::FromUTF8 function, use it
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1527 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-12-07 21:02:55 +00:00
twanvl
bcc582f912
added 'file_modified_time' function, which should be faster than using wxFileName
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1519 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-10-03 16:47:38 +00:00
twanvl
2f7d95af9c
No longer using namespace boost,
...
doing that lead to conflicts in new compilers, because both boost and std contain a shared_ptr type.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1517 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-10-03 16:16:28 +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
69ea39c64f
slightly better error messages when reading an enum value fails: also report the default used
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1464 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-08-02 23:05:05 +00:00
twanvl
44b3d15a68
warn about invalid conversion to int/double/bool in Reader
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1459 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-22 13:36:05 +00:00
twanvl
864cabb590
fixed nullptr exception when opening a stylesheet without a game twice, the solution is to re-load when loading/validating fails the first time
...
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1451 0fc631ac-6414-0410-93d0-97cfa31319b6
2010-07-21 18:49:12 +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