Compatibility updates step 1.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@815 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2008-01-05 22:37:22 +00:00
parent aec798b8f6
commit 692ff43573
13 changed files with 866 additions and 825 deletions
+6 -6
View File
@@ -1,4 +1,4 @@
//+----------------------------------------------------------------------------+
// //+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2007 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
@@ -131,7 +131,7 @@ inline bool is_set(const Scriptable<double>& x) {
return x.isScripted() || x < 100000;
}
inline bool is_setw(const Scriptable<double>& x) {
return x.isScripted() || abs(x) > 0.001;
return x.isScripted() || fabs(x) > 0.001;
}
int Style::update(Context& ctx) {
@@ -187,11 +187,11 @@ int Style::update(Context& ctx) {
bool Style::isVisible() const {
return visible
&& (width) > 0
&& abs(left) < 100000
&& abs(right) < 100000
&& fabs(left) < 100000
&& fabs(right) < 100000
&& (height) > 0
&& abs(top) < 100000
&& abs(bottom) < 100000;
&& fabs(top) < 100000
&& fabs(bottom) < 100000;
}
bool Style::hasSize() const {
int h = is_setw(width) + is_set(left) + is_set(right);