Commit Graph

484 Commits

Author SHA1 Message Date
Twan van Laarhoven 360f8d71ad Fix: check starting_age <= age, instead of starting_age < age. Otherwise we can get into an infinite loop. 2020-05-07 02:56:43 +02:00
Twan van Laarhoven 26f35893ae Remove our own atomic type in favor of std::atomic 2020-05-07 02:17:14 +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 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 b1595c9179 (small clean up) 2020-05-02 16:12:15 +02:00
Twan van Laarhoven 6edba0c5c0 Move buffering to Reader 2020-05-02 01:04:35 +02:00
Twan van Laarhoven 06471e5231 Use Base::reflect instead of reflect_impl for reflecting base properties, made reflect_impl private.
This should fix #8
2020-04-30 17:40:36 +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 a8b7699ac3 Revert changes to spec_sort 2020-04-27 17:21:24 +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 af7e8c9d39 Switch (back) to our own Color type instead of using wxColour.
The reason is that wxColour's default constructor creates an invalid color (what is that even?). It is nicer to just have default be transparent.
2020-04-26 21:41:35 +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 b5f18ebec7 Take version number from Cmake file. This way the number is only in one place 2020-04-25 23:36:00 +02:00
Twan van Laarhoven 37c8641641 Replace scoped_ptr by unique_ptr 2020-04-25 22:28:32 +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 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 e8e7e10fa0 Make extension optional in --export command.
Added add_extension function
Added ExportTemplate::byName
Use ExportTemplate::byName in main
2020-04-21 00:23:42 +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 a5b2b77d2a Use C++14 so we have make_unique 2020-04-20 19:49:25 +02:00
Twan van Laarhoven cbf1251f8c Fix more gcc warnings 2020-04-16 01:03:10 +02:00
Twan van Laarhoven a8d78fc28c Fix errors about string iteration on gcc/linux builds 2020-04-16 00:35:43 +02:00
Twan van Laarhoven 2ef73f3fa3 Rewrite spec_sort: don't use REMOVED, fix code to work with wx unicode strings. 2020-04-14 21:07:33 +02:00
Twan van Laarhoven 0cffdb7d1a move reverse_string to string.hpp 2020-04-14 20:27:39 +02:00
Twan van Laarhoven 36918281c0 Fix: index out of bounds 2020-04-10 18:57:59 +02:00
Twan van Laarhoven f76a1230c4 Fix compilation in gcc 2020-04-10 17:44:29 +02:00
Twan van Laarhoven f10ec682ad Fix index out of range bug 2020-04-10 16:57:53 +02:00
Twan van Laarhoven 914a4ecceb fix iterator error 2020-04-10 14:46:27 +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 8f7cc53d5b Fix crash. 2017-01-18 06:25:22 -06:00
Lymia Aluysia 8c960f0c34 Work on compiling on mingw 2017-01-18 04:56:16 -06:00
Lymia Aluysia b9616d09a6 Fix unresolved reference. 2017-01-17 23:54:13 -06:00
Lymia Aluysia 24ba3ab28a Fix check for HAVE_GCC_ATOMIC_BUILTINS 2017-01-17 23:41:59 -06:00
twanvl c6a74d4576 linux: added console_panel to makefile, removed junk from error.hpp
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1642 0fc631ac-6414-0410-93d0-97cfa31319b6
2011-01-24 11:57:11 +00:00
twanvl df9c539983 version bump to 2.0.0
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1635 0fc631ac-6414-0410-93d0-97cfa31319b6
2011-01-22 17:54:34 +00:00
twanvl fa7f25306b copying messages from console
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1634 0fc631ac-6414-0410-93d0-97cfa31319b6
2011-01-22 13:15:05 +00:00