- Updates to get the map editor compiling

This commit is contained in:
Mark Vejvoda
2010-06-01 01:56:14 +00:00
parent f70f0cc896
commit 288bd3a287
3 changed files with 16 additions and 2 deletions

View File

@@ -15,6 +15,7 @@
#include "icons.h" #include "icons.h"
#include "platform_common.h" #include "platform_common.h"
#include <iostream> #include <iostream>
#include "math_wrapper.h"
using namespace Shared::Util; using namespace Shared::Util;
using namespace Shared::PlatformCommon; using namespace Shared::PlatformCommon;
@@ -966,6 +967,14 @@ void SimpleDialog::show() {
// =============================================== // ===============================================
bool App::OnInit() { bool App::OnInit() {
#ifdef USE_STREFLOP
streflop_init<streflop::Simple>();
printf("STREFLOP enabled.\n");
#else
printf("STREFLOP NOT enabled.\n");
#endif
string fileparam; string fileparam;
if(argc==2){ if(argc==2){
fileparam = wxFNCONV(argv[1]); fileparam = wxFNCONV(argv[1]);

View File

@@ -19,7 +19,6 @@
#include <wx/glcanvas.h> #include <wx/glcanvas.h>
#include "program.h" #include "program.h"
#include "util.h" #include "util.h"
using std::string; using std::string;

View File

@@ -12,7 +12,8 @@
#include "map.h" #include "map.h"
#include <cmath> //#include <cmath>
#include "math_wrapper.h"
#include <stdexcept> #include <stdexcept>
using namespace Shared::Util; using namespace Shared::Util;
@@ -75,7 +76,12 @@ int Map::getStartLocationY(int index) const {
static int get_dist(int delta_x, int delta_y) { static int get_dist(int delta_x, int delta_y) {
float dx = delta_x; float dx = delta_x;
float dy = delta_y; float dy = delta_y;
#ifdef USE_STREFLOP
return static_cast<int>(streflop::sqrtf(dx * dx + dy * dy));
#else
return static_cast<int>(sqrtf(dx * dx + dy * dy)); return static_cast<int>(sqrtf(dx * dx + dy * dy));
#endif
} }
void Map::glestChangeHeight(int x, int y, int height, int radius) { void Map::glestChangeHeight(int x, int y, int height, int radius) {