mirror of
https://github.com/glest/glest-source.git
synced 2025-08-24 00:42:50 +02:00
- Updates to get the map editor compiling
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "icons.h"
|
||||
#include "platform_common.h"
|
||||
#include <iostream>
|
||||
#include "math_wrapper.h"
|
||||
|
||||
using namespace Shared::Util;
|
||||
using namespace Shared::PlatformCommon;
|
||||
@@ -966,6 +967,14 @@ void SimpleDialog::show() {
|
||||
// ===============================================
|
||||
|
||||
bool App::OnInit() {
|
||||
#ifdef USE_STREFLOP
|
||||
|
||||
streflop_init<streflop::Simple>();
|
||||
printf("STREFLOP enabled.\n");
|
||||
#else
|
||||
printf("STREFLOP NOT enabled.\n");
|
||||
#endif
|
||||
|
||||
string fileparam;
|
||||
if(argc==2){
|
||||
fileparam = wxFNCONV(argv[1]);
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#include <wx/glcanvas.h>
|
||||
|
||||
#include "program.h"
|
||||
|
||||
#include "util.h"
|
||||
|
||||
using std::string;
|
||||
|
@@ -12,7 +12,8 @@
|
||||
|
||||
#include "map.h"
|
||||
|
||||
#include <cmath>
|
||||
//#include <cmath>
|
||||
#include "math_wrapper.h"
|
||||
#include <stdexcept>
|
||||
|
||||
using namespace Shared::Util;
|
||||
@@ -75,7 +76,12 @@ int Map::getStartLocationY(int index) const {
|
||||
static int get_dist(int delta_x, int delta_y) {
|
||||
float dx = delta_x;
|
||||
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));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Map::glestChangeHeight(int x, int y, int height, int radius) {
|
||||
|
Reference in New Issue
Block a user