rendered paste bodyIndex: ogsim/src/float25.cpp
===================================================================
--- ogsim/src/float25.cpp (revision 695)
+++ ogsim/src/float25.cpp (working copy)
@@ -4,7 +4,7 @@
*/
#include "float25.hpp"
-
+#include <stdio.h>
#include <iostream>
float25::float25() {
Index: ogsim/src/simulator.cpp
===================================================================
--- ogsim/src/simulator.cpp (revision 695)
+++ ogsim/src/simulator.cpp (working copy)
@@ -30,6 +30,12 @@
#include <assert.h>
#include <math.h>
+#include <string>
+#include <cstring>
+#include <cstdlib>
+
+
+
#include <qapplication.h>
#include <qevent.h>
#include <qvaluelist.h>
Index: ogsim/src/render.cpp
===================================================================
--- ogsim/src/render.cpp (revision 695)
+++ ogsim/src/render.cpp (working copy)
@@ -7,9 +7,12 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <algorithm>
#include "render.hpp"
+using namespace std;
+
#define max(a, b) ((a) >? (b))
#define min(a, b) ((a) <? (b))
@@ -1045,6 +1048,8 @@
float25 Ac, float25 Rc, float25 Gc, float25 Bc,
float25& R, float25& G, float25& B)
{
+ using std::min;
+
switch (func) {
case 0:
R = G = B = 0;
@@ -1068,7 +1073,7 @@
R = G = B = Ac;
break;
case 7:
- R = G = B = min(As, 1.0-Ad);
+ R = G = B = (std::min)(As, float25(1.0 - Ad));
break;
}
@@ -1115,6 +1120,9 @@
{
float25 Sr, Sg, Sb, Dr, Dg, Db, Sa, Da;
+ using std::min;
+ using std::max;
+
// Compute source weights
ComputeColorBlendFactors(BlendState.SourceColorFunc,
As, Rs, Gs, Bs, Ad, Rd, Gd, Bd,
@@ -1155,14 +1163,14 @@
B = -Bs*Sb + Bd*Db;
break;
case GL_MIN:
- R = min(Rs, Rd);
- G = min(Gs, Gd);
- B = min(Bs, Bd);
+ R = (std::min)(Rs, Rd);
+ G = (std::min)(Gs, Gd);
+ B = (std::min)(Bs, Bd);
break;
case GL_MAX:
- R = max(Rs, Rd);
- G = max(Gs, Gd);
- B = max(Bs, Bd);
+ R = (std::max)(Rs, Rd);
+ G = (std::max)(Gs, Gd);
+ B = (std::max)(Bs, Bd);
break;
}
@@ -1181,10 +1189,10 @@
A = -As*Sa + Ad*Da;
break;
case GL_MIN:
- A = min(As, Ad);
+ A = (std::min)(As, Ad);
break;
case GL_MAX:
- A = max(As, Ad);
+ A = (std::max)(As, Ad);
break;
}
}
Index: ogsim/admin/cvs.sh
===================================================================
--- ogsim/admin/cvs.sh (revision 695)
+++ ogsim/admin/cvs.sh (working copy)
@@ -64,7 +64,7 @@
echo "*** KDE requires automake 1.6.1 or newer"
exit 1
;;
- automake*1.6.* | automake*1.7* | automake*1.8.* | automake*1.9* | automake*1.10* ) : ;;
+ automake*1.6.* | automake*1.7* | automake*1.8.* | automake*1.9* | automake*1.10* | automake*1.11* ) : ;;
"" )
echo "*** AUTOMAKE NOT FOUND!."
echo "*** KDE requires automake 1.6.1 or newer"