X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ struct Color4ub {
g((rgba >> 16) & 0xff),
b((rgba >> 8) & 0xff),
a(rgba & 0xff) {}
constexpr Color4ub(const Color4ub &c, const Uint8 a) :
r(c.r),
g(c.g),
b(c.b),
a(a) {}

operator unsigned char *() { return &r; }
operator const unsigned char *() const { return &r; }
Expand Down
6 changes: 4 additions & 2 deletions src/HyperspaceCloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,13 @@ void HyperspaceCloud::InitGraphics(Graphics::Renderer *renderer)

Graphics::VertexArray vertices(ATTRIB_POSITION | ATTRIB_DIFFUSE);

make_circle_thing(vertices, 1000.f, Color::WHITE, Color::BLUE);
const Color edgeArrivingColour(Color::BLUE, 0); // alpha needs to be zero'd
make_circle_thing(vertices, 1000.f, Color::WHITE, edgeArrivingColour);
s_cloudMeshArriving.reset(renderer->CreateMeshObjectFromArray(&vertices));

vertices.Clear();

make_circle_thing(vertices, 1000.f, Color::WHITE, Color::RED);
const Color edgeLeavingColour(Color::RED, 0); // alpha needs to be zero'd
make_circle_thing(vertices, 1000.f, Color::WHITE, edgeLeavingColour);
s_cloudMeshLeaving.reset(renderer->CreateMeshObjectFromArray(&vertices));
}
X Tutup