From 95d27392403b3789bb62ae12e1d3928a18cdae04 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Mon, 13 Aug 2018 00:48:57 -0400 Subject: [PATCH] clean up unused conefill function and debug --- src/hexgame.cpp | 10 +++++----- src/hexlib.cpp | 8 -------- src/hexlib.h | 1 - 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/hexgame.cpp b/src/hexgame.cpp index 64571ef..3bbbe8f 100644 --- a/src/hexgame.cpp +++ b/src/hexgame.cpp @@ -5,6 +5,7 @@ // - pathfinding // - assimp animation // - update imgui to v1.62 -- requires changes to example api +// - add prefix to interface function names for eg) gooey.h, renderer.h //----------------------------------------------------------------------------- // Some defaults for the game layout @@ -191,7 +192,6 @@ updateHexConeFill(int32 x, int32 y) if (hxi && (hxi != g_game_state->current_hex) && g_game_state->start_hex) { g_game_state->current_hex = hxi; - vector hexes = hex_conefill(g_game_state->start_hex->hex, hxi->hex); // TODO: Remove debug code here and from gooey.h Point p1(g_game_state->start_hex->XPos, g_game_state->start_hex->YPos); @@ -231,10 +231,10 @@ updateHexConeFill(int32 x, int32 y) } } - g_polygon_select_vertices[0].x = p1.x; g_polygon_select_vertices[0].y = p1.y; - g_polygon_select_vertices[1].x = vert2.x; g_polygon_select_vertices[1].y = vert2.y; - g_polygon_select_vertices[2].x = p2.x; g_polygon_select_vertices[2].y = p2.y; - g_polygon_select_vertices[3].x = vert4.x; g_polygon_select_vertices[3].y = vert4.y; + g_polygon_select_vertices[0] = p1; + g_polygon_select_vertices[1] = vert2; + g_polygon_select_vertices[2] = p2; + g_polygon_select_vertices[3] = vert4; } } diff --git a/src/hexlib.cpp b/src/hexlib.cpp index 66ba955..a2be6b8 100644 --- a/src/hexlib.cpp +++ b/src/hexlib.cpp @@ -186,14 +186,6 @@ hex_equal(Hex a, Hex b) return (a.q == b.q && a.r == b.r && a.s == b.s); } -vector -hex_conefill(Hex a, Hex b) -{ - vector results = {}; - - return results; -} - // NOTE: implementation of this line crossing test // https://graphics.stanford.edu/pub/Graphics/RTNews/html/rtnv5n3.html#art3 // NOTE: assumes use of convex polygons with vertices in CCW layout diff --git a/src/hexlib.h b/src/hexlib.h index 6235402..343bb58 100644 --- a/src/hexlib.h +++ b/src/hexlib.h @@ -74,7 +74,6 @@ vector polygon_corners(Layout layout, Hex h); // custom hex functions bool hex_equal(Hex a, Hex b); -vector hex_conefill(Hex a, Hex b); // NOTE: implementation of this line crossing test // https://graphics.stanford.edu/pub/Graphics/RTNews/html/rtnv5n3.html#art3