Etc: Implement missing RGSS3 functionality (and bind in MRI)
This commit is contained in:
parent
0c5e84eb4b
commit
5bc6f6f32c
3 changed files with 58 additions and 6 deletions
30
src/etc.cpp
30
src/etc.cpp
|
@ -78,6 +78,15 @@ void Color::set(double red, double green, double blue, double alpha)
|
|||
updateInternal();
|
||||
}
|
||||
|
||||
void Color::set(const Color &other)
|
||||
{
|
||||
red = other.red;
|
||||
green = other.green;
|
||||
blue = other.blue;
|
||||
alpha = other.alpha;
|
||||
norm = other.norm;
|
||||
}
|
||||
|
||||
void Color::setRed(double value)
|
||||
{
|
||||
red = value;
|
||||
|
@ -183,6 +192,17 @@ void Tone::set(double red, double green, double blue, double gray)
|
|||
valueChanged();
|
||||
}
|
||||
|
||||
void Tone::set(const Tone &other)
|
||||
{
|
||||
red = other.red;
|
||||
green= other.green;
|
||||
blue = other.blue;
|
||||
gray = other.gray;
|
||||
norm = other.norm;
|
||||
|
||||
valueChanged();
|
||||
}
|
||||
|
||||
void Tone::setRed(double value)
|
||||
{
|
||||
red = value;
|
||||
|
@ -295,6 +315,16 @@ void Rect::set(int x, int y, int w, int h)
|
|||
valueChanged();
|
||||
}
|
||||
|
||||
void Rect::set(const Rect &other)
|
||||
{
|
||||
x = other.x;
|
||||
y = other.y;
|
||||
width = other.width;
|
||||
height = other.height;
|
||||
|
||||
valueChanged();
|
||||
}
|
||||
|
||||
void Rect::empty()
|
||||
{
|
||||
if (!(x || y || width || height))
|
||||
|
|
|
@ -56,6 +56,8 @@ struct Color : public Serializable
|
|||
void updateExternal();
|
||||
|
||||
void set(double red, double green, double blue, double alpha);
|
||||
void set(const Color &other);
|
||||
|
||||
void setRed(double value);
|
||||
void setGreen(double value);
|
||||
void setBlue(double value);
|
||||
|
@ -104,6 +106,8 @@ struct Tone : public Serializable
|
|||
void updateInternal();
|
||||
|
||||
void set(double red, double green, double blue, double gray);
|
||||
void set(const Tone &other);
|
||||
|
||||
void setRed(double value);
|
||||
void setGreen(double value);
|
||||
void setBlue(double value);
|
||||
|
@ -155,6 +159,7 @@ struct Rect : public Serializable
|
|||
bool operator==(const Rect &o) const;
|
||||
void operator=(const IntRect &rect);
|
||||
void set(int x, int y, int w, int h);
|
||||
void set(const Rect &other);
|
||||
|
||||
FloatRect toFloatRect() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue