diff --git a/drawutils.h b/drawutils.h index 238cc68..a87b1ed 100644 --- a/drawutils.h +++ b/drawutils.h @@ -18,7 +18,7 @@ class DrawUtils static bool draw(SDL_Surface* dest, SDL_Surface* drawable, int x, int y, int x2, int y2, int w, int h); static void draw_line(SDL_Surface* dest, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint16 width, Uint32 colour); - static void draw_circle_filled(SDL_Surface* dest, Sint16 x, Sint16 y, Uint16 r, Uint32 colour, Uint8 alpha = 255); + static void draw_circle_filled(SDL_Surface* dest, Sint16 x, Sint16 y, Uint16 r, Uint32 colour); // transpare (v) - to make transparent static bool transpare(SDL_Surface* surface, int r, int g, int b); diff --git a/graph.h b/graph.h index fda14e9..2199096 100644 --- a/graph.h +++ b/graph.h @@ -35,16 +35,18 @@ class Graph bool vertex_present(int x, int y, int size); - list get_vertices() { return vertices; } - list get_edges() { return edges; } + list get_vertices() const { return vertices; } + list get_edges() const { return edges; } void select_vertex(int x, int y); void do_vertex(int x, int y, int r); - Vertex* get_current_vertex() { return current_vertex; } + + Vertex* get_current_vertex() const { return current_vertex; } + void clear_current_vertex() { current_vertex = NULL; } private: - bool vertex_would_overlap(int x, int y, int r); - bool crosses_edge(Edge e); + bool vertex_would_overlap(int x, int y, int r) const; + bool crosses_edge(Edge e) const; void add_vertex(int x, int y, int r); Vertex* current_vertex;