Skip to content

Commit

Permalink
Rebased onto master, fixed werrors and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Hume2 committed Feb 3, 2016
1 parent 1d9e886 commit b27b423
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
8 changes: 5 additions & 3 deletions src/trigger/sequence_trigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

SequenceTrigger::SequenceTrigger(const ReaderMapping& reader) :
triggerevent(),
sequence(SEQ_ENDSEQUENCE)
sequence(SEQ_ENDSEQUENCE),
new_size()
{
if (!reader.get("x", bbox.p1.x)) bbox.p1.x = 0;
if (!reader.get("y", bbox.p1.y)) bbox.p1.y = 0;
Expand All @@ -45,7 +46,8 @@ SequenceTrigger::SequenceTrigger(const ReaderMapping& reader) :

SequenceTrigger::SequenceTrigger(const Vector& pos, const std::string& sequence_name) :
triggerevent(),
sequence(SEQ_ENDSEQUENCE)
sequence(SEQ_ENDSEQUENCE),
new_size()
{
bbox.set_pos(pos);
bbox.set_size(32, 32);
Expand Down Expand Up @@ -76,7 +78,7 @@ SequenceTrigger::get_settings() {

ObjectOption seq(MN_STRINGSELECT, _("Sequence"), &sequence);
seq.select.push_back(_("end sequence"));
seq.select.push_back(_("stop tux"));
seq.select.push_back(_("stop Tux"));
seq.select.push_back(_("fireworks"));

result.options.push_back( seq );
Expand Down
14 changes: 14 additions & 0 deletions src/video/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,18 @@ Color::operator < (const Color& other) const
return greyscale() < other.greyscale();
}

std::vector<float>
Color::toVector(bool include_alpha)
{
std::vector<float> result;
result.clear();
result.push_back(red);
result.push_back(green);
result.push_back(blue);
if (include_alpha){
result.push_back(alpha);
}
return result;
}

/* EOF */
12 changes: 1 addition & 11 deletions src/video/color.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,7 @@ class Color

bool operator < (const Color& other) const;

std::vector<float> toVector(bool include_alpha){
std::vector<float> result;
result.clear();
result.push_back(red);
result.push_back(green);
result.push_back(blue);
if (include_alpha){
result.push_back(alpha);
}
return result;
}
std::vector<float> toVector(bool include_alpha);

float red, green, blue, alpha;

Expand Down

0 comments on commit b27b423

Please sign in to comment.