- cleaned up more compiler warnings
- added unsigned 64 bit type for windows
This commit is contained in:
parent
c6a4e53151
commit
45a26a4597
|
@ -142,8 +142,8 @@ void Map::pirateChangeHeight(int x, int y, int height, int radius) {
|
||||||
// round off the corners
|
// round off the corners
|
||||||
int ti, tj;
|
int ti, tj;
|
||||||
if (abs(i - x) == abs(j - y)) {
|
if (abs(i - x) == abs(j - y)) {
|
||||||
ti = (i - x) * 0.707 + x + 0.5;
|
ti = (int)((i - x) * 0.707 + x + 0.5);
|
||||||
tj = (j - y) * 0.707 + y + 0.5;
|
tj = (int)((j - y) * 0.707 + y + 0.5);
|
||||||
} else {
|
} else {
|
||||||
ti = i;
|
ti = i;
|
||||||
tj = j;
|
tj = j;
|
||||||
|
@ -154,7 +154,7 @@ void Map::pirateChangeHeight(int x, int y, int height, int radius) {
|
||||||
//gradient[indexI][indexJ] = 0;
|
//gradient[indexI][indexJ] = 0;
|
||||||
} else {
|
} else {
|
||||||
// assume outside the map bounds is height 10
|
// assume outside the map bounds is height 10
|
||||||
gradient[indexI][indexJ] = (10.0 - goalAlt) / radius;
|
gradient[indexI][indexJ] = (10.0f - (float)goalAlt) / (float)radius;
|
||||||
}
|
}
|
||||||
//std::cout << "gradient[" << indexI << "][" << indexJ << "] = " << gradient[indexI][indexJ] << std::endl;
|
//std::cout << "gradient[" << indexI << "][" << indexJ << "] = " << gradient[indexI][indexJ] << std::endl;
|
||||||
//std::cout << "derived from height " << cells[ti][tj].height << " at " << ti << " " << tj << std::endl;
|
//std::cout << "derived from height " << cells[ti][tj].height << " at " << ti << " " << tj << std::endl;
|
||||||
|
|
|
@ -31,6 +31,7 @@ typedef unsigned short int uint16;
|
||||||
typedef int int32;
|
typedef int int32;
|
||||||
typedef unsigned int uint32;
|
typedef unsigned int uint32;
|
||||||
typedef long long int64;
|
typedef long long int64;
|
||||||
|
typedef unsigned long long uint64;
|
||||||
|
|
||||||
}}//end namespace
|
}}//end namespace
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <xercesc/util/PlatformUtils.hpp>
|
#include <xercesc/util/PlatformUtils.hpp>
|
||||||
#include <xercesc/framework/LocalFileFormatTarget.hpp>
|
#include <xercesc/framework/LocalFileFormatTarget.hpp>
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "types.h"
|
||||||
#include "leak_dumper.h"
|
#include "leak_dumper.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +42,7 @@ public:
|
||||||
char msgStr[strSize], fileStr[strSize];
|
char msgStr[strSize], fileStr[strSize];
|
||||||
XMLString::transcode(domError.getMessage(), msgStr, strSize-1);
|
XMLString::transcode(domError.getMessage(), msgStr, strSize-1);
|
||||||
XMLString::transcode(domError.getLocation()->getURI(), fileStr, strSize-1);
|
XMLString::transcode(domError.getLocation()->getURI(), fileStr, strSize-1);
|
||||||
uint64 lineNumber= domError.getLocation()->getLineNumber();
|
Shared::Platform::uint64 lineNumber= domError.getLocation()->getLineNumber();
|
||||||
throw runtime_error("Error parsing XML, file: " + string(fileStr) + ", line: " + intToStr(lineNumber) + ": " + string(msgStr));
|
throw runtime_error("Error parsing XML, file: " + string(fileStr) + ", line: " + intToStr(lineNumber) + ": " + string(msgStr));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user