Added transparency to nodes

This commit is contained in:
2011-06-22 18:24:20 -04:00
parent fc08adcade
commit fc8a76c1db
3 changed files with 19 additions and 1 deletions

View File

@ -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);