mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Fixed a bunch of linker errors preventing optimized compile on Linux.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1352 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <util/prec.hpp>
|
||||
#include <data/field/choice.hpp>
|
||||
#include <util/io/package.hpp>
|
||||
#include <util/defaultable.hpp>
|
||||
#include <wx/imaglist.h>
|
||||
|
||||
DECLARE_TYPEOF_COLLECTION(ChoiceField::ChoiceP);
|
||||
@@ -303,3 +304,5 @@ bool ChoiceValue::update(Context& ctx) {
|
||||
IMPLEMENT_REFLECTION_NAMELESS(ChoiceValue) {
|
||||
if (fieldP->save_value || tag.scripting() || tag.reading()) REFLECT_NAMELESS(value);
|
||||
}
|
||||
|
||||
INSTANTIATE_REFLECTION_NAMELESS(ChoiceValue)
|
||||
|
||||
+5
-5
@@ -376,7 +376,7 @@ void PackInstance::generate(vector<CardP>* out) {
|
||||
if (pack_type.select == SELECT_ALL) {
|
||||
// add all cards
|
||||
generate_all(out, requested_copies);
|
||||
|
||||
|
||||
} else if (pack_type.select == SELECT_REPLACE
|
||||
|| pack_type.select == SELECT_PROPORTIONAL
|
||||
|| pack_type.select == SELECT_NONEMPTY) {
|
||||
@@ -384,7 +384,7 @@ void PackInstance::generate(vector<CardP>* out) {
|
||||
for (size_t i = 0 ; i < requested_copies ; ++i) {
|
||||
generate_one_random(out);
|
||||
}
|
||||
|
||||
|
||||
} else if (pack_type.select == SELECT_NO_REPLACE) {
|
||||
if (!pack_type.items.empty()) {
|
||||
throw Error(_("'select:no replace' is not yet supported in combination with 'items', only with 'filter'."));
|
||||
@@ -402,7 +402,7 @@ void PackInstance::generate(vector<CardP>* out) {
|
||||
rem -= max_per_batch;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if (pack_type.select == SELECT_EQUAL
|
||||
|| pack_type.select == SELECT_EQUAL_PROPORTIONAL
|
||||
|| pack_type.select == SELECT_EQUAL_NONEMPTY) {
|
||||
@@ -419,7 +419,7 @@ void PackInstance::generate(vector<CardP>* out) {
|
||||
if (pack_type.select == SELECT_EQUAL_PROPORTIONAL) {
|
||||
wi.weight = item->weight * parent.get(item->name).total_weight;
|
||||
} else if (pack_type.select == SELECT_EQUAL_NONEMPTY) {
|
||||
wi.weight = parent.get(item->name).total_weight > 0 ? item->weight : 0;
|
||||
wi.weight = parent.get(item->name).total_weight > 0 ? static_cast<int>(item->weight) : 0;
|
||||
} else {
|
||||
wi.weight = item->weight;
|
||||
}
|
||||
@@ -452,7 +452,7 @@ void PackInstance::generate(vector<CardP>* out) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if (pack_type.select == SELECT_FIRST) {
|
||||
if (!cards.empty()) {
|
||||
// there is a card, pick it
|
||||
|
||||
+2
-1
@@ -17,6 +17,7 @@
|
||||
#include <data/field/information.hpp>
|
||||
#include <util/tagged_string.hpp> // for 0.2.7 fix
|
||||
#include <util/order_cache.hpp>
|
||||
#include <util/delayed_index_maps.hpp>
|
||||
#include <script/script_manager.hpp>
|
||||
#include <script/profiler.hpp>
|
||||
#include <wx/sstream.h>
|
||||
@@ -145,7 +146,7 @@ void Set::validate(Version file_app_version) {
|
||||
if (stylesheet->game != game) {
|
||||
throw Error(_ERROR_("stylesheet and set refer to different game"));
|
||||
}
|
||||
|
||||
|
||||
// This is our chance to fix version incompatabilities
|
||||
if (file_app_version < 207) {
|
||||
// Since 0.2.7 we use </tag> style close tags, in older versions it was </>
|
||||
|
||||
Reference in New Issue
Block a user