From 91faf8a182e6a5d034f723e938e6760724a14511 Mon Sep 17 00:00:00 2001 From: Wanne Date: Mon, 23 Jan 2017 19:28:19 +0000 Subject: [PATCH] Fixed compilation error in VS2005 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8374 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Minigame.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Tactical/Minigame.cpp b/Tactical/Minigame.cpp index d9ef0b62..e33febf7 100644 --- a/Tactical/Minigame.cpp +++ b/Tactical/Minigame.cpp @@ -50,6 +50,7 @@ #include "WordWrap.h" #include "gamescreen.h" #include "Isometric Utils.h" +#include "math.h" // remember the previous screen UINT32 guiMiniGamePreviousScreen = GAME_SCREEN; @@ -2396,9 +2397,9 @@ UINT32 MiniGame_Handle_Pong() { // colour x, y if // (it->x - x)^2 + (it->y - y)^2 <= r^2 - // <=> (it->y - y) <= +/- std::sqrt( r^2 - (it->x - x)^2 ) - // <=> y >= it->y +/- std::sqrt( r^2 - (it->x - x)^2 ) - int sqrstuff = std::sqrt( it->r * it->r - (it->x - x) * (it->x - x) ); + // <=> (it->y - y) <= +/- sqrt( r^2 - (it->x - x)^2 ) + // <=> y >= it->y +/- sqrt( r^2 - (it->x - x)^2 ) + int sqrstuff = sqrt( it->r * it->r - (it->x - x) * (it->x - x) ); ColorFillVideoSurfaceArea( FRAME_BUFFER, max( MINIGAME_PONG_X_LOW, x),