Revision: 1371
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1371&view=rev
Author: rorthomas
Date: 2010-05-05 19:39:17 +0000 (Wed, 05 May 2010)
Log Message:
-----------
improvements for NOLANG compilation mode: fixed several string problems
fixed several problems when compiling in UNICODE mode under windows
fixed several problem with combinations of feature precompiler flags
Modified Paths:
--------------
trunk/source/main/CacheSystem.cpp
trunk/source/main/ExampleFrameListener.cpp
trunk/source/main/ScriptEngine.cpp
trunk/source/main/TruckHUD.cpp
trunk/source/main/language.cpp
trunk/source/main/luasystem.cpp
Modified: trunk/source/main/CacheSystem.cpp
===================================================================
--- trunk/source/main/CacheSystem.cpp 2010-05-05 16:03:43 UTC (rev 1370)
+++ trunk/source/main/CacheSystem.cpp 2010-05-05 19:39:17 UTC (rev 1371)
@@ -652,7 +652,7 @@
Ogre::String CacheSystem::fileTime(String filename)
{
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
- HANDLE hFile = CreateFile(filename.c_str(), FILE_READ_ATTRIBUTES,
FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ HANDLE hFile = CreateFileA(filename.c_str(), FILE_READ_ATTRIBUTES,
FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
// Set the file time on the file
FILETIME ftCreate, ftAccess, ftWrite;
Modified: trunk/source/main/ExampleFrameListener.cpp
===================================================================
--- trunk/source/main/ExampleFrameListener.cpp 2010-05-05 16:03:43 UTC (rev
1370)
+++ trunk/source/main/ExampleFrameListener.cpp 2010-05-05 19:39:17 UTC (rev
1371)
@@ -3151,7 +3151,7 @@
{
cameramode = CAMERA_FREE;
LogManager::getSingleton().logMessage("switching to
free camera mode from fixed mode");
- flashMessage(_L("free camera").c_str());
+ flashMessage(_L("free camera"));
}
}
@@ -3163,14 +3163,14 @@
// change back to normal camera
cameramode = storedcameramode;
LogManager::getSingleton().logMessage("exiting free
camera mode");
- flashMessage(_L("normal camera").c_str());
+ flashMessage(_L("normal camera"));
} else if(cameramode != CAMERA_FREE && cameramode !=
CAMERA_FREE_FIXED )
{
// enter free camera mode
storedcameramode = cameramode;
cameramode = CAMERA_FREE;
LogManager::getSingleton().logMessage("entering free
camera mode");
- flashMessage(_L("free camera").c_str());
+ flashMessage(_L("free camera"));
}
}
@@ -8100,7 +8100,7 @@
if
(collisions->isInside(trucks[t]->nodes[i].AbsPosition, spawnbox))
{
//boy, thats bad
- flashMessage(_L("Please clear the place
first").c_str(), 4);
+ flashMessage(_L("Please clear the place
first"), 4);
return;
}
}
Modified: trunk/source/main/ScriptEngine.cpp
===================================================================
--- trunk/source/main/ScriptEngine.cpp 2010-05-05 16:03:43 UTC (rev 1370)
+++ trunk/source/main/ScriptEngine.cpp 2010-05-05 19:39:17 UTC (rev 1371)
@@ -914,6 +914,7 @@
void GameScript::showChooser(string &type, string &instance, string &box)
{
+#ifdef USE_MYGUI
SelectorWindow::LoaderType ntype = SelectorWindow::LT_None;
if (type == "vehicle") ntype = SelectorWindow::LT_Vehicle;
if (type == "truck") ntype = SelectorWindow::LT_Truck;
@@ -926,6 +927,7 @@
if (type == "extension") ntype = SelectorWindow::LT_Extension;
if (ntype != SelectorWindow::LT_None)
mefl->showLoad(ntype, const_cast<char*>(instance.c_str()),
const_cast<char*>(box.c_str()));
+#endif //USE_MYGUI
}
void GameScript::repairVehicle(string &instance, string &box)
Modified: trunk/source/main/TruckHUD.cpp
===================================================================
--- trunk/source/main/TruckHUD.cpp 2010-05-05 16:03:43 UTC (rev 1370)
+++ trunk/source/main/TruckHUD.cpp 2010-05-05 19:39:17 UTC (rev 1371)
@@ -198,7 +198,7 @@
{
sprintf(beamhealthstr, "%0.2f", (1-health)*100);
descl =
OverlayManager::getSingleton().getOverlayElement("tracks/TruckInfoBox/BeamHealth");
- descl->setCaption(_L("health: ") + beamhealthstr +
string("%"));
+ descl->setCaption(_L("health: ") +
string(beamhealthstr) + string("%"));
checkOverflow(descl);
descl =
OverlayManager::getSingleton().getOverlayElement("tracks/TruckInfoBox/BeamHealth");
descl->setColour(ColourValue(0.6,0.8,0.4,1));
@@ -210,7 +210,7 @@
health=1;
sprintf(beamhealthstr, "%0.2f", (health)*100);
descl =
OverlayManager::getSingleton().getOverlayElement("tracks/TruckInfoBox/BeamHealth");
- descl->setCaption(_L("destruction: ") + beamhealthstr +
string("%"));
+ descl->setCaption(_L("destruction: ") +
string(beamhealthstr) + string("%"));
checkOverflow(descl);
descl =
OverlayManager::getSingleton().getOverlayElement("tracks/TruckInfoBox/BeamHealth");
descl->setColour(ColourValue(0.8,0.4,0.4,1));
@@ -225,13 +225,13 @@
char beamavdeformedstr[255];
sprintf(beamavdeformedstr, "%0.4f",
((float)average_deformation/(float)beamCount));
descl =
OverlayManager::getSingleton().getOverlayElement("tracks/TruckInfoBox/AverageBeamDeformation");
- descl->setCaption(_L("average deformation: ") +
beamavdeformedstr);
+ descl->setCaption(_L("average deformation: ") +
string(beamavdeformedstr));
checkOverflow(descl);
char beamstressstr[255];
sprintf(beamstressstr, "%+08.0f",
1-(float)beamstress/(float)beamCount);
descl =
OverlayManager::getSingleton().getOverlayElement("tracks/TruckInfoBox/AverageBeamStress");
- descl->setCaption(_L("average stress: ") + beamstressstr);
+ descl->setCaption(_L("average stress: ") +
string(beamstressstr));
checkOverflow(descl);
int nodeCount = truck->getNodeCount();
Modified: trunk/source/main/language.cpp
===================================================================
--- trunk/source/main/language.cpp 2010-05-05 16:03:43 UTC (rev 1370)
+++ trunk/source/main/language.cpp 2010-05-05 19:39:17 UTC (rev 1371)
@@ -22,6 +22,8 @@
*/
// created: 12th of January 2009, thomas fischer
thomas{AT}thomasfischer{DOT}biz
+#ifndef NOLANG
+
#include "OgreFontManager.h"
#include "language.h"
#include "Settings.h"
@@ -149,3 +151,4 @@
//fontCacheInit("Cyberbit");
//generateAllFontTextures();
}
+#endif //NOLANG
\ No newline at end of file
Modified: trunk/source/main/luasystem.cpp
===================================================================
--- trunk/source/main/luasystem.cpp 2010-05-05 16:03:43 UTC (rev 1370)
+++ trunk/source/main/luasystem.cpp 2010-05-05 19:39:17 UTC (rev 1371)
@@ -360,7 +360,6 @@
const char *box = lua_tostring (lua, 3);
#ifdef USE_MYGUI
SelectorWindow::LoaderType ntype = SelectorWindow::LT_None;
-#endif //USE_MYGUI
if (!strcmp("vehicle", type)) ntype = SelectorWindow::LT_Vehicle;
if (!strcmp("truck", type)) ntype = SelectorWindow::LT_Truck;
if (!strcmp("car", type)) ntype = SelectorWindow::LT_Truck;
@@ -373,6 +372,7 @@
if (!strcmp("extension", type)) ntype = SelectorWindow::LT_Extension;
if (ntype != SelectorWindow::LT_None)
mefl->showLoad(ntype, (char*)inst, (char*)box);
+#endif //USE_MYGUI
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel