Date: Tue, 17 Sep 2013 12:31:28 +0000 (UTC) From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r327471 - head/games/flare/files Message-ID: <201309171231.r8HCVSY8018501@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: amdmi3 Date: Tue Sep 17 12:31:27 2013 New Revision: 327471 URL: http://svnweb.freebsd.org/changeset/ports/327471 Log: Fix build with clang/libc++ Added: head/games/flare/files/ head/games/flare/files/patch-src-Hazard.cpp (contents, props changed) head/games/flare/files/patch-src-MapCollision.cpp (contents, props changed) head/games/flare/files/patch-src-Utils.cpp (contents, props changed) head/games/flare/files/patch-src-Utils.h (contents, props changed) Added: head/games/flare/files/patch-src-Hazard.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/flare/files/patch-src-Hazard.cpp Tue Sep 17 12:31:27 2013 (r327471) @@ -0,0 +1,34 @@ +--- src/Hazard.cpp.orig 2013-04-01 18:21:13.000000000 +0400 ++++ src/Hazard.cpp 2013-09-17 05:59:52.364226200 +0400 +@@ -91,17 +91,17 @@ + activeAnimation->advanceFrame(); + + // handle movement +- if (!(round(speed.x) == 0 && round(speed.y) == 0)) { ++ if (!(myround(speed.x) == 0 && myround(speed.y) == 0)) { + pos.x += speed.x; + pos.y += speed.y; + + // very simplified collider, could skim around corners + // or even pass through thin walls if speed > tilesize +- if (collider->is_wall(round(pos.x), round(pos.y))) { ++ if (collider->is_wall(myround(pos.x), myround(pos.y))) { + lifespan = 0; + hit_wall = true; + +- if (collider->is_outside_map(round(pos.x) >> TILE_SHIFT, round(pos.y) >> TILE_SHIFT)) ++ if (collider->is_outside_map(myround(pos.x) >> TILE_SHIFT, myround(pos.y) >> TILE_SHIFT)) + remove_now = true; + } + } +@@ -143,8 +143,8 @@ + { + if (delay_frames == 0 && activeAnimation) { + Renderable re = activeAnimation->getCurrentFrame(animationKind); +- re.map_pos.x = round(pos.x); +- re.map_pos.y = round(pos.y); ++ re.map_pos.x = myround(pos.x); ++ re.map_pos.y = myround(pos.y); + (floor ? r_dead : r).push_back(re); + } + } Added: head/games/flare/files/patch-src-MapCollision.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/flare/files/patch-src-MapCollision.cpp Tue Sep 17 12:31:27 2013 (r327471) @@ -0,0 +1,20 @@ +--- src/MapCollision.cpp.orig 2013-04-01 18:21:13.000000000 +0400 ++++ src/MapCollision.cpp 2013-09-17 06:00:27.655226476 +0400 +@@ -238,7 +238,7 @@ + for (int i=0; i<steps; i++) { + x += step_x; + y += step_y; +- if (is_wall(round(x), round(y))) ++ if (is_wall(myround(x), myround(y))) + return false; + } + } +@@ -246,7 +246,7 @@ + for (int i=0; i<steps; i++) { + x += step_x; + y += step_y; +- if (!is_valid_position(round(x), round(y), movement_type)) ++ if (!is_valid_position(myround(x), myround(y), movement_type)) + return false; + } + } Added: head/games/flare/files/patch-src-Utils.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/flare/files/patch-src-Utils.cpp Tue Sep 17 12:31:27 2013 (r327471) @@ -0,0 +1,20 @@ +--- src/Utils.cpp.orig 2013-04-01 18:21:13.000000000 +0400 ++++ src/Utils.cpp 2013-09-17 05:57:39.713315065 +0400 +@@ -25,14 +25,14 @@ + using namespace std; + + +-int round(float f) { ++int myround(float f) { + return (int)(f + 0.5); + } + + Point round(FPoint fp) { + Point result; +- result.x = round(fp.x); +- result.y = round(fp.y); ++ result.x = myround(fp.x); ++ result.y = myround(fp.y); + return result; + } + Added: head/games/flare/files/patch-src-Utils.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/flare/files/patch-src-Utils.h Tue Sep 17 12:31:27 2013 (r327471) @@ -0,0 +1,11 @@ +--- src/Utils.h.orig 2013-04-01 18:21:13.000000000 +0400 ++++ src/Utils.h 2013-09-17 05:57:30.563226254 +0400 +@@ -85,7 +85,7 @@ + }; + + // Utility Functions +-int round(float f); ++int myround(float f); + Point round(FPoint fp); + Point screen_to_map(int x, int y, int camx, int camy); + Point map_to_screen(int x, int y, int camx, int camy);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309171231.r8HCVSY8018501>