Added 'position hint' to packages, used to specify the order of the packages in a package list;

Added 'pack type', intended for playtesting (random boosters/starters);
Added 'default(_image)' property to ImageStyle, and added the frame fillers for magic;
Added blurring and bold printing (rather hacky) to the text rendering functions (used for "double click to add image" text);
Added 'symmetric overlay' combine mode, which will look really nice for hybrids;
Moved the watermark choices from the game to an include file in magic-watermarks;
Working on a replacement for the image scripting system that plays nicer with the rest of the code. In particular, it will be possible to compare generated images quickly, so they can be updated continuously. This is a work in progress, currently there are two versions of everything.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@327 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-09 21:41:15 +00:00
parent 6f7db851a7
commit 3c4729aaa2
63 changed files with 964 additions and 134 deletions
+3 -1
View File
@@ -26,11 +26,13 @@ IMPLEMENT_REFLECTION(ImageField) {
IMPLEMENT_REFLECTION(ImageStyle) {
REFLECT_BASE(Style);
REFLECT_N("mask", mask_filename);
REFLECT_N("default", default_image);
}
bool ImageStyle::update(Context& ctx) {
return Style ::update(ctx)
| mask_filename.update(ctx);
| mask_filename.update(ctx)
| default_image.update(ctx);
}
// ----------------------------------------------------------------------------- : ImageValue
+4 -1
View File
@@ -12,6 +12,7 @@
#include <util/prec.hpp>
#include <data/field.hpp>
#include <script/scriptable.hpp>
#include <script/image.hpp>
// ----------------------------------------------------------------------------- : ImageField
@@ -38,6 +39,7 @@ class ImageStyle : public Style {
DECLARE_STYLE_TYPE(Image);
Scriptable<String> mask_filename; ///< Filename for a mask image
ScriptableImage2 default_image; ///< Placeholder
virtual bool update(Context&);
@@ -53,7 +55,8 @@ class ImageValue : public Value {
inline ImageValue(const ImageFieldP& field) : Value(field) {}
typedef FileName ValueType;
ValueType filename; ///< Filename of the image (in the current package), or ""
ValueType filename; ///< Filename of the image (in the current package), or ""
Age last_update; ///< When was the image last changed?
virtual String toString() const;
+2 -2
View File
@@ -29,11 +29,11 @@ IMPLEMENT_REFLECTION(SymbolStyle) {
REFLECT(variations);
}
SymbolStyle::Variation::Variation()
SymbolVariation::SymbolVariation()
: border_radius(0.05)
{}
IMPLEMENT_REFLECTION(SymbolStyle::Variation) {
IMPLEMENT_REFLECTION(SymbolVariation) {
REFLECT(name);
REFLECT(border_radius);
REFLECT_NAMELESS(filter);
+6 -6
View File
@@ -14,6 +14,7 @@
#include <script/scriptable.hpp>
DECLARE_POINTER_TYPE(SymbolFilter);
DECLARE_POINTER_TYPE(SymbolVariation);
// ----------------------------------------------------------------------------- : SymbolField
@@ -39,18 +40,16 @@ class SymbolStyle : public Style {
inline SymbolStyle(const SymbolFieldP& field) : Style(field) {}
DECLARE_STYLE_TYPE(Symbol);
class Variation;
typedef shared_ptr<Variation> VariationP;
vector<VariationP> variations; ///< Different variantions of the same symbol
vector<SymbolVariationP> variations; ///< Different variantions of the same symbol
private:
DECLARE_REFLECTION();
};
/// Styling for a symbol variation, defines color, border, etc.
class SymbolStyle::Variation {
class SymbolVariation {
public:
Variation();
SymbolVariation();
String name; ///< Name of this variation
SymbolFilterP filter; ///< Filter to color the symbol
double border_radius; ///< Border radius for the symbol
@@ -66,7 +65,8 @@ class SymbolValue : public Value {
DECLARE_HAS_FIELD(Symbol)
typedef FileName ValueType;
ValueType filename; ///< Filename of the symbol (in the current package)
ValueType filename; ///< Filename of the symbol (in the current package)
Age last_update; ///< When was the symbol last changed?
virtual String toString() const;