Browse Source

clean up unused conefill function and debug

master
cinnaboot 8 years ago
parent
commit
95d2739240
  1. 10
      src/hexgame.cpp
  2. 8
      src/hexlib.cpp
  3. 1
      src/hexlib.h

10
src/hexgame.cpp

@ -5,6 +5,7 @@
// - pathfinding // - pathfinding
// - assimp animation // - assimp animation
// - update imgui to v1.62 -- requires changes to example api // - 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 // 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) if (hxi && (hxi != g_game_state->current_hex) && g_game_state->start_hex)
{ {
g_game_state->current_hex = hxi; g_game_state->current_hex = hxi;
vector<Hex> hexes = hex_conefill(g_game_state->start_hex->hex, hxi->hex);
// TODO: Remove debug code here and from gooey.h // TODO: Remove debug code here and from gooey.h
Point p1(g_game_state->start_hex->XPos, g_game_state->start_hex->YPos); 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[0] = p1;
g_polygon_select_vertices[1].x = vert2.x; g_polygon_select_vertices[1].y = vert2.y; g_polygon_select_vertices[1] = vert2;
g_polygon_select_vertices[2].x = p2.x; g_polygon_select_vertices[2].y = p2.y; g_polygon_select_vertices[2] = p2;
g_polygon_select_vertices[3].x = vert4.x; g_polygon_select_vertices[3].y = vert4.y; g_polygon_select_vertices[3] = vert4;
} }
} }

8
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); return (a.q == b.q && a.r == b.r && a.s == b.s);
} }
vector<Hex>
hex_conefill(Hex a, Hex b)
{
vector<Hex> results = {};
return results;
}
// NOTE: implementation of this line crossing test // NOTE: implementation of this line crossing test
// https://graphics.stanford.edu/pub/Graphics/RTNews/html/rtnv5n3.html#art3 // https://graphics.stanford.edu/pub/Graphics/RTNews/html/rtnv5n3.html#art3
// NOTE: assumes use of convex polygons with vertices in CCW layout // NOTE: assumes use of convex polygons with vertices in CCW layout

1
src/hexlib.h

@ -74,7 +74,6 @@ vector<Point> polygon_corners(Layout layout, Hex h);
// custom hex functions // custom hex functions
bool hex_equal(Hex a, Hex b); bool hex_equal(Hex a, Hex b);
vector<Hex> hex_conefill(Hex a, Hex b);
// NOTE: implementation of this line crossing test // NOTE: implementation of this line crossing test
// https://graphics.stanford.edu/pub/Graphics/RTNews/html/rtnv5n3.html#art3 // https://graphics.stanford.edu/pub/Graphics/RTNews/html/rtnv5n3.html#art3

Loading…
Cancel
Save