Added transparency to nodes
This commit is contained in:
@ -47,7 +47,9 @@ bool GameCore::init()
|
||||
}
|
||||
|
||||
background = DrawUtils::load("background.bmp");
|
||||
|
||||
node = DrawUtils::load("node.bmp");
|
||||
DrawUtils::transpare(node, 255, 0, 255);
|
||||
|
||||
if (background == NULL || node == NULL)
|
||||
{
|
||||
@ -63,6 +65,8 @@ bool GameCore::init()
|
||||
|
||||
void GameCore::render()
|
||||
{
|
||||
DrawUtils::draw(display, background, 0, 0);
|
||||
|
||||
list<Vertex> vertices = graph.get_vertices();
|
||||
list<Edge> edges = graph.get_edges();
|
||||
|
||||
@ -77,7 +81,7 @@ void GameCore::render()
|
||||
cursor != edges.end(); cursor++)
|
||||
{
|
||||
Edge e = *cursor;
|
||||
DrawUtils::draw_line(e.a.x, e.a.y, e.b.x, e.b.y, 2, 0xffffff, display);
|
||||
DrawUtils::draw_line(e.a.x, e.a.y, e.b.x, e.b.y, 2, 0x000000, display);
|
||||
}
|
||||
|
||||
SDL_Flip(display);
|
||||
|
Reference in New Issue
Block a user