mirror of
https://github.com/glest/glest-source.git
synced 2025-08-08 09:26:27 +02:00
Test fix for LUA environment variables
This commit is contained in:
@@ -467,7 +467,6 @@ namespace Glest {
|
|||||||
|
|
||||||
for (int i = 0; i < (int) scriptsNode->getChildCount(); ++i) {
|
for (int i = 0; i < (int) scriptsNode->getChildCount(); ++i) {
|
||||||
const XmlNode *scriptNode = scriptsNode->getChild(i);
|
const XmlNode *scriptNode = scriptsNode->getChild(i);
|
||||||
|
|
||||||
scripts.push_back(Script(getFunctionName(scriptNode), scriptNode->getText()));
|
scripts.push_back(Script(getFunctionName(scriptNode), scriptNode->getText()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -102,10 +102,7 @@ namespace Glest {
|
|||||||
|
|
||||||
for (int i = 0; i < (int) scriptsNode->getChildCount(); ++i) {
|
for (int i = 0; i < (int) scriptsNode->getChildCount(); ++i) {
|
||||||
const XmlNode *scriptNode = scriptsNode->getChild(i);
|
const XmlNode *scriptNode = scriptsNode->getChild(i);
|
||||||
|
scripts.push_back(Script(getFunctionName(scriptNode), scriptNode->getText()));
|
||||||
scripts.push_back(Script
|
|
||||||
(getFunctionName(scriptNode),
|
|
||||||
scriptNode->getText()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Exception handling (conversions and so on);
|
//Exception handling (conversions and so on);
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "leak_dumper.h"
|
#include "leak_dumper.h"
|
||||||
|
#include "platform_common.h"
|
||||||
|
|
||||||
using std::map;
|
using std::map;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
@@ -60,6 +61,7 @@ namespace Shared {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static void setApplicationPath(string value) {
|
static void setApplicationPath(string value) {
|
||||||
|
Shared::PlatformCommon::replaceAll(value, "\\", "/");
|
||||||
applicationPath = value;
|
applicationPath = value;
|
||||||
}
|
}
|
||||||
static string getApplicationPath() {
|
static string getApplicationPath() {
|
||||||
@@ -67,6 +69,7 @@ namespace Shared {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void setApplicationDataPath(string value) {
|
static void setApplicationDataPath(string value) {
|
||||||
|
Shared::PlatformCommon::replaceAll(value, "\\", "/");
|
||||||
applicationDataPath = value;
|
applicationDataPath = value;
|
||||||
}
|
}
|
||||||
static string getApplicationDataPath() {
|
static string getApplicationDataPath() {
|
||||||
@@ -74,6 +77,7 @@ namespace Shared {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void setGameVersion(string value) {
|
static void setGameVersion(string value) {
|
||||||
|
Shared::PlatformCommon::replaceAll(value, "\\", "/");
|
||||||
gameVersion = value;
|
gameVersion = value;
|
||||||
}
|
}
|
||||||
static string getGameVersion() {
|
static string getGameVersion() {
|
||||||
@@ -81,18 +85,21 @@ namespace Shared {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void setTechtreePath(string value) {
|
static void setTechtreePath(string value) {
|
||||||
|
Shared::PlatformCommon::replaceAll(value, "\\", "/");
|
||||||
techtreePath = value;
|
techtreePath = value;
|
||||||
}
|
}
|
||||||
static string getTechtreePath() {
|
static string getTechtreePath() {
|
||||||
return techtreePath;
|
return techtreePath;
|
||||||
}
|
}
|
||||||
static void setScenarioPath(string value) {
|
static void setScenarioPath(string value) {
|
||||||
|
Shared::PlatformCommon::replaceAll(value, "\\", "/");
|
||||||
scenarioPath = value;
|
scenarioPath = value;
|
||||||
}
|
}
|
||||||
static string getScenarioPath() {
|
static string getScenarioPath() {
|
||||||
return scenarioPath;
|
return scenarioPath;
|
||||||
}
|
}
|
||||||
static void setTutorialPath(string value) {
|
static void setTutorialPath(string value) {
|
||||||
|
Shared::PlatformCommon::replaceAll(value, "\\", "/");
|
||||||
tutorialPath = value;
|
tutorialPath = value;
|
||||||
}
|
}
|
||||||
static string getTutorialPath() {
|
static string getTutorialPath() {
|
||||||
|
@@ -17,7 +17,9 @@
|
|||||||
#include "interpolation.h"
|
#include "interpolation.h"
|
||||||
#include "leak_dumper.h"
|
#include "leak_dumper.h"
|
||||||
|
|
||||||
|
#ifndef FLT_EPSILON
|
||||||
#define FLT_EPSILON 1.192092896e-07F
|
#define FLT_EPSILON 1.192092896e-07F
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace Shared::Platform;
|
using namespace Shared::Platform;
|
||||||
|
|
||||||
@@ -28,8 +30,7 @@ namespace Shared {
|
|||||||
|
|
||||||
void MeshCallback::execute(const Mesh *mesh, float alpha) {
|
void MeshCallback::execute(const Mesh *mesh, float alpha) {
|
||||||
alpha *= mesh->getOpacity();
|
alpha *= mesh->getOpacity();
|
||||||
//team color
|
uint8 factionOpacity = mesh->getFactionColorOpacity(); //team color
|
||||||
uint8 factionOpacity = mesh->getFactionColorOpacity();
|
|
||||||
float color[4];
|
float color[4];
|
||||||
color[0] = 1.0f; // Red
|
color[0] = 1.0f; // Red
|
||||||
color[1] = 1.0f; // Green
|
color[1] = 1.0f; // Green
|
||||||
|
@@ -234,6 +234,7 @@ namespace Shared {
|
|||||||
//string appPath="";
|
//string appPath="";
|
||||||
//appPath.assign(&pMBBuffer[0]); // Now assign the char* to the string, and there you have it!!! :)
|
//appPath.assign(&pMBBuffer[0]); // Now assign the char* to the string, and there you have it!!! :)
|
||||||
std::string appPath = utf8_encode(szPath);
|
std::string appPath = utf8_encode(szPath);
|
||||||
|
replaceAll(appPath, "\\", "/");
|
||||||
|
|
||||||
//string appPath = szPath;
|
//string appPath = szPath;
|
||||||
mapTagReplacementValues["$APPDATA"] = appPath;
|
mapTagReplacementValues["$APPDATA"] = appPath;
|
||||||
|
Reference in New Issue
Block a user