Eliminated most build errors (gcc,linux,wxGTK).

What is left is mostly:
 - warning: converting double to int
     -> add a cast/to_int or ignore
 - wrong initialization order in ctor
     -> just swap the order to match the class
 - errors about wxCursors
     -> add a function loadResourceCursor


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@183 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-01-29 00:04:20 +00:00
parent 1cd80a3710
commit 3d9181e5f6
42 changed files with 151 additions and 125 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ inline double sgn(double v) { return v > 0 ? 1 : -1; }
Vector2D constrainVector(const Vector2D& v, bool constrain, bool onlyDiagonal) {
if (!constrain) return v;
double ax = abs(v.x), ay = abs(v.y);
double ax = fabs(v.x), ay = fabs(v.y);
if (ax * 2 < ay && !onlyDiagonal) {
return Vector2D(0, v.y); // vertical
} else if(ay * 2 < ax && !onlyDiagonal) {
+2
View File
@@ -11,6 +11,8 @@
#include <util/prec.hpp>
#include <util/reflect.hpp>
#include <util/error.hpp>
#include <data/field.hpp> // for Card::value
class Game;
class Dependency;
+1 -1
View File
@@ -35,7 +35,7 @@ class Font {
/// Update the scritables, returns true if there is a change
bool update(Context& ctx);
/// Add the given dependency to the dependent_scripts list for the variables this font depends on
virtual void initDependencies(Context&, const Dependency&) const;
void initDependencies(Context&, const Dependency&) const;
/// Does this font have a shadow?
inline bool hasShadow() { return shadow_displacement.width != 0 || shadow_displacement.height != 0; }
+1 -1
View File
@@ -38,7 +38,7 @@ void read_compat(Reader& tag, Keyword* k) {
KeywordExpansionP e(new KeywordExpansion);
size_t start = separator.find_first_of('[');
size_t end = separator.find_first_of(']');
if (start != String.npos && end != String.npos) {
if (start != String::npos && end != String::npos) {
e->after += separator.substr(start + 1, end - start - 1);
}
if (!parameter.empty()) {
+2 -2
View File
@@ -37,8 +37,8 @@ Set::Set(const GameP& game)
}
Set::Set(const StyleSheetP& stylesheet)
: stylesheet(stylesheet)
, game(stylesheet->game)
: game(stylesheet->game)
, stylesheet(stylesheet)
, script_manager(new SetScriptManager(*this))
{
data.init(game->set_fields);
+3 -3
View File
@@ -83,13 +83,13 @@ IMPLEMENT_REFLECTION(StyleSheetSettings) {
Settings settings;
Settings::Settings()
: set_window_maximized (false)
: locale (_("en"))
, set_window_maximized (false)
, set_window_width (790)
, set_window_height (300)
, card_notes_height (40)
, updates_url (_("http://magicseteditor.sourceforge.net/updates"))
, check_updates (CHECK_IF_CONNECTED)
, locale (_("en"))
, updates_url (_("http://magicseteditor.sourceforge.net/updates"))
{}
void Settings::addRecentFile(const String& filename) {
+2 -2
View File
@@ -26,12 +26,12 @@ class StatsDimension {
StatsDimension();
StatsDimension(const Field&);
bool automatic; ///< Based on a card field?
String name; ///< Name of this dimension
String description; ///< Description, used in status bar
String icon_filename; ///< Icon for lists
OptionalScript script; ///< Script that determines the value(s)
bool numeric; ///< Are the values numeric? If so, they require special sorting
bool automatic; ///< Based on a card field?
DECLARE_REFLECTION();
};
@@ -51,13 +51,13 @@ class StatsCategory {
StatsCategory();
StatsCategory(const StatsDimensionP&);
bool automatic; ///< Automatically generated?
String name; ///< Name/label
String description; ///< Description, used in status bar
String icon_filename; ///< Icon for lists
Bitmap icon; ///< The loaded icon (optional of course)
vector<StatsDimensionP> dimensions; ///< The dimensions to use, higher dimensions may be null
GraphType type; ///< Type of graph to use
bool automatic; ///< Automatically generated?
DECLARE_REFLECTION();
};
+5 -5
View File
@@ -41,16 +41,16 @@ ControlPoint::ControlPoint()
, lock(LOCK_FREE)
{}
ControlPoint::ControlPoint(double x, double y)
: segment_before(SEGMENT_LINE), segment_after(SEGMENT_LINE)
: pos(x,y)
, segment_before(SEGMENT_LINE), segment_after(SEGMENT_LINE)
, lock(LOCK_FREE)
, pos(x,y)
{}
ControlPoint::ControlPoint(double x, double y, double xb, double yb, double xa, double ya, LockMode lock)
: segment_before(SEGMENT_CURVE), segment_after(SEGMENT_CURVE)
, lock(lock)
, pos(x,y)
: pos(x,y)
, delta_before(xb,yb)
, delta_after(xa,ya)
, segment_before(SEGMENT_CURVE), segment_after(SEGMENT_CURVE)
, lock(lock)
{}
void ControlPoint::onUpdateHandle(WhichHandle wh) {