Revision: 1671
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1671&view=rev
Author: rorthomas
Date: 2011-02-13 14:43:37 +0000 (Sun, 13 Feb 2011)
Log Message:
-----------
fixed more linux problems
Modified Paths:
--------------
trunk/source/main/audio/SoundScriptManager.cpp
trunk/source/main/gameplay/CacheSystem.cpp
trunk/source/main/gameplay/RoRFrameListener.cpp
trunk/source/main/gameplay/TorqueCurve.cpp
trunk/source/main/gameplay/skinmanager.cpp
trunk/source/main/gfx/Skidmark.cpp
trunk/source/main/gui/gui_mp.cpp
trunk/source/main/physics/BeamSlideNode.cpp
trunk/source/main/physics/CmdKeyInertia.cpp
trunk/source/main/physics/input_output/BeamLoadTruck.cpp
trunk/source/main/utils/language.cpp
trunk/source/updater/ConfigManager.cpp
trunk/source/updater/wthread.cpp
Modified: trunk/source/main/audio/SoundScriptManager.cpp
===================================================================
--- trunk/source/main/audio/SoundScriptManager.cpp 2011-02-13 13:40:27 UTC
(rev 1670)
+++ trunk/source/main/audio/SoundScriptManager.cpp 2011-02-13 14:43:37 UTC
(rev 1671)
@@ -272,7 +272,7 @@
{
// Attribute
// Split params on space
- Ogre::vector<String>::type vecparams =
StringUtil::split(line, "\t ", 0);
+ Ogre::StringVector vecparams =
StringUtil::split(line, "\t ", 0);
if (!sst->setParameter(vecparams))
{
Modified: trunk/source/main/gameplay/CacheSystem.cpp
===================================================================
--- trunk/source/main/gameplay/CacheSystem.cpp 2011-02-13 13:40:27 UTC (rev
1670)
+++ trunk/source/main/gameplay/CacheSystem.cpp 2011-02-13 14:43:37 UTC (rev
1671)
@@ -220,7 +220,7 @@
void CacheSystem::parseModAttribute(const String& line, Cache_Entry& t)
{
- Ogre::vector<String>::type params = StringUtil::split(line,
"\x09\x0a=,");
+ Ogre::StringVector params = StringUtil::split(line, "\x09\x0a=,");
String& attrib = params[0];
StringUtil::toLowerCase(attrib);
if (attrib == "number")
@@ -534,7 +534,7 @@
else
{
String mat = params[1];
- Ogre::vector < Ogre::String >::type ar =
StringUtil::split(mat," ");
+ Ogre::StringVector ar = StringUtil::split(mat," ");
for(Ogre::vector < Ogre::String >::type::iterator it =
ar.begin(); it!=ar.end(); it++)
t.materials.insert(*it);
}
@@ -1081,8 +1081,8 @@
Ogre::String CacheSystem::normalizeText(Ogre::String text)
{
String result = "";
- Ogre::vector <Ogre::String>::type str = Ogre::StringUtil::split(text,
"\n");
- for(Ogre::vector <Ogre::String>::type::iterator it = str.begin();
it!=str.end(); it++)
+ Ogre::StringVector str = Ogre::StringUtil::split(text, "\n");
+ for(Ogre::StringVector::iterator it = str.begin(); it!=str.end(); it++)
result += *it + "$";
return result;
}
@@ -1090,8 +1090,8 @@
Ogre::String CacheSystem::deNormalizeText(Ogre::String text)
{
String result = "";
- Ogre::vector <Ogre::String>::type str = Ogre::StringUtil::split(text,
"$");
- for(Ogre::vector <Ogre::String>::type::iterator it = str.begin();
it!=str.end(); it++)
+ Ogre::StringVector str = Ogre::StringUtil::split(text, "$");
+ for(Ogre::StringVector::iterator it = str.begin(); it!=str.end(); it++)
result += *it + "\n";
return result;
}
@@ -1412,7 +1412,7 @@
char uniquetruckid[255]="";
int categoryid=0, truckversion=0;
String lineStr = String(line);
- Ogre::vector<String>::type args =
StringUtil::split(lineStr, ", ");
+ Ogre::StringVector args = StringUtil::split(lineStr, ",
");
if(args.size() < 1)
{
LogManager::getSingleton().logMessage("Error
parsing File (fileinfo) " + String(fname) +" line " +
StringConverter::toString(linecounter) + ". trying to continue ...");
Modified: trunk/source/main/gameplay/RoRFrameListener.cpp
===================================================================
--- trunk/source/main/gameplay/RoRFrameListener.cpp 2011-02-13 13:40:27 UTC
(rev 1670)
+++ trunk/source/main/gameplay/RoRFrameListener.cpp 2011-02-13 14:43:37 UTC
(rev 1671)
@@ -1116,12 +1116,12 @@
Vector3 spawnLocation = Vector3::ZERO;
if(cmd != "")
{
- Ogre::vector<String>::type str = StringUtil::split(cmd, "/");
+ Ogre::StringVector str = StringUtil::split(cmd, "/");
// process args now
for(Ogre::vector<String>::type::iterator it = str.begin();
it!=str.end(); it++)
{
String argstr = *it;
- Ogre::vector<String>::type args =
StringUtil::split(argstr, ":");
+ Ogre::StringVector args = StringUtil::split(argstr,
":");
if(args.size()<2) continue;
if(args[0] == "action" && args.size() == 2) cmdAction =
args[1];
if(args[0] == "serverpass" && args.size() == 2)
SETTINGS.setSetting("Server password", args[1]);
Modified: trunk/source/main/gameplay/TorqueCurve.cpp
===================================================================
--- trunk/source/main/gameplay/TorqueCurve.cpp 2011-02-13 13:40:27 UTC (rev
1670)
+++ trunk/source/main/gameplay/TorqueCurve.cpp 2011-02-13 14:43:37 UTC (rev
1671)
@@ -73,7 +73,7 @@
if (line.empty() || line[0]==';')
continue;
- Ogre::vector< String >::type args = StringUtil::split(line,
",");
+ Ogre::StringVector args = StringUtil::split(line, ",");
if (args.size() == 1)
{
Modified: trunk/source/main/gameplay/skinmanager.cpp
===================================================================
--- trunk/source/main/gameplay/skinmanager.cpp 2011-02-13 13:40:27 UTC (rev
1670)
+++ trunk/source/main/gameplay/skinmanager.cpp 2011-02-13 14:43:37 UTC (rev
1671)
@@ -154,7 +154,7 @@
//---------------------------------------------------------------------
void SkinManager::parseAttribute(const String& line, Skin *pSkin)
{
- Ogre::vector<String>::type params = StringUtil::split(line,
"\x09\x0a\x20\x3d"); // 0x9 = tab, 0xa = \n, 0x20 = space, 0x3d = '='
+ Ogre::StringVector params = StringUtil::split(line,
"\x09\x0a\x20\x3d"); // 0x9 = tab, 0xa = \n, 0x20 = space, 0x3d = '='
String& attrib = params[0];
StringUtil::toLowerCase(attrib);
Modified: trunk/source/main/gfx/Skidmark.cpp
===================================================================
--- trunk/source/main/gfx/Skidmark.cpp 2011-02-13 13:40:27 UTC (rev 1670)
+++ trunk/source/main/gfx/Skidmark.cpp 2011-02-13 14:43:37 UTC (rev 1671)
@@ -72,7 +72,7 @@
if (line.empty() || line[0]==';')
continue;
- Ogre::vector< Ogre::String >::type args =
Ogre::StringUtil::split(line, ",");
+ Ogre::StringVector args = Ogre::StringUtil::split(line, ",");
if (args.size() == 1)
{
Modified: trunk/source/main/gui/gui_mp.cpp
===================================================================
--- trunk/source/main/gui/gui_mp.cpp 2011-02-13 13:40:27 UTC (rev 1670)
+++ trunk/source/main/gui/gui_mp.cpp 2011-02-13 14:43:37 UTC (rev 1671)
@@ -169,7 +169,7 @@
x -= 18;
// flag
- Ogre::vector<Ogre::String>::type parts =
StringUtil::split(string(c->language), "_");
+ Ogre::StringVector parts = StringUtil::split(string(c->language), "_");
if(parts.size() == 2)
{
String lang = parts[1];
Modified: trunk/source/main/physics/BeamSlideNode.cpp
===================================================================
--- trunk/source/main/physics/BeamSlideNode.cpp 2011-02-13 13:40:27 UTC (rev
1670)
+++ trunk/source/main/physics/BeamSlideNode.cpp 2011-02-13 14:43:37 UTC (rev
1671)
@@ -48,7 +48,7 @@
bool Beam::parseRailGroupLine(const Ogre::String& line)
{
- Ogre::vector<Ogre::String>::type options =
Ogre::StringUtil::split(line, ",");
+ Ogre::StringVector options = Ogre::StringUtil::split(line, ",");
if( options.size() < 3)
{
@@ -72,7 +72,7 @@
bool Beam::parseSlideNodeLine(const Ogre::String& line)
{
// add spaces as a separator to remove them
- Ogre::vector<Ogre::String>::type options =
Ogre::StringUtil::split(line, ", ");
+ Ogre::StringVector options = Ogre::StringUtil::split(line, ", ");
if( options.size() < 2)
{
Modified: trunk/source/main/physics/CmdKeyInertia.cpp
===================================================================
--- trunk/source/main/physics/CmdKeyInertia.cpp 2011-02-13 13:40:27 UTC (rev
1670)
+++ trunk/source/main/physics/CmdKeyInertia.cpp 2011-02-13 14:43:37 UTC (rev
1671)
@@ -155,7 +155,7 @@
if (line.empty() || line[0]==';')
continue;
- Ogre::vector< String >::type args = StringUtil::split(line,
",");
+ Ogre::StringVector args = StringUtil::split(line, ",");
if (args.size() == 1)
{
Modified: trunk/source/main/physics/input_output/BeamLoadTruck.cpp
===================================================================
--- trunk/source/main/physics/input_output/BeamLoadTruck.cpp 2011-02-13
13:40:27 UTC (rev 1670)
+++ trunk/source/main/physics/input_output/BeamLoadTruck.cpp 2011-02-13
14:43:37 UTC (rev 1671)
@@ -6,7 +6,7 @@
For more information, see http://www.rigsofrods.com/
Rigs of Rods is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 3, as
+it under the terms of the GNU General Public License version 3, as
published by the Free Software Foundation.
Rigs of Rods is distributed in the hope that it will be useful,
@@ -251,7 +251,7 @@
if(!strcmp(modestr, "classic")) externalcameramode = 0;
if(!strcmp(modestr, "cinecam")) externalcameramode = 1;
if(!strcmp(modestr, "node")) externalcameramode = 2;
-
+
externalcameranode = nodeid;
continue;
}
@@ -325,7 +325,7 @@
LogManager::getSingleton().logMessage("Error
parsing File (prop_camera_mode) " + String(fname) +" line " +
StringConverter::toString(linecounter) + ". trying to continue ...");
continue;
}
-
+
// always use the last prop
prop_t *prop = &props[free_prop-1];
if(prop->mo) prop->cameramode = mode;
@@ -340,7 +340,7 @@
LogManager::getSingleton().logMessage("Error
parsing File (flexbody_camera_mode) " + String(fname) +" line " +
StringConverter::toString(linecounter) + ". trying to continue ...");
continue;
}
-
+
// always use the last flexbody
FlexBody *flex = flexbodies[free_flexbody-1];
if(flex) flex->cameramode = mode;
@@ -348,6 +348,7 @@
if (!strncmp("add_animation", line, 13))
{
+ printf(">>> add_animation\n");
/*
* this command has several layers for splitting up the
line:
* 1. ',' the top level will be split up with a comma
to separate the main options
@@ -357,12 +358,12 @@
int animnum = 0;
float ratio = 0.0f, opt1 = -1.0f, opt2 = -1.0f;
// parse the line
- if(String(line).size() < 14)
+ if(strnlen(line, 255) < 14)
{
LogManager::getSingleton().logMessage("Error
parsing File (add_animation) " + String(fname) +" line " +
StringConverter::toString(linecounter) + ". Not enough Options parsed, trying
to continue ...");
continue;
}
- Ogre::vector<Ogre::String>::type options =
Ogre::StringUtil::split(String(line).substr(14), ","); // "add_animation " = 14
characters
+ Ogre::StringVector options =
Ogre::StringUtil::split(String(line).substr(14), ","); // "add_animation " = 14
characters
// check for common errors
if (options.size() < 4)
{
@@ -415,7 +416,7 @@
} else
{
// parse the rest
- Ogre::vector<Ogre::String>::type args2
= Ogre::StringUtil::split(options[i], ":");
+ Ogre::StringVector args2 =
Ogre::StringUtil::split(options[i], ":");
if(args2.size() == 0)
continue;
@@ -426,7 +427,7 @@
if(args2[0] == "source" && args2.size()
== 2)
{
//set source identification flag
-
Ogre::vector<Ogre::String>::type args3 = Ogre::StringUtil::split(args2[1], "|");
+ Ogre::StringVector args3 =
Ogre::StringUtil::split(args2[1], "|");
for(unsigned int
j=0;j<args3.size();j++)
{
String sourceStr =
args3[j];
@@ -513,7 +514,7 @@
else if(args2[0] == "mode" &&
args2.size() == 2)
{
//set mode identification flag
-
Ogre::vector<Ogre::String>::type args3 = Ogre::StringUtil::split(args2[1], "|");
+ Ogre::StringVector args3 =
Ogre::StringUtil::split(args2[1], "|");
for(unsigned int
j=0;j<args3.size();j++)
{
String modeStr =
args3[j];
@@ -565,7 +566,7 @@
// now parse the keys
prop->animFlags[animnum] |=
ANIM_FLAG_EVENT;
-
Ogre::vector<Ogre::String>::type args3 = Ogre::StringUtil::split(args2[1], "|");
+ Ogre::StringVector args3 =
Ogre::StringUtil::split(args2[1], "|");
for(unsigned int
j=0;j<args3.size();j++)
{
String eventStr =
args3[j];
@@ -1332,10 +1333,11 @@
}
else if (mode==66)
{
+ printf(">>> animators\n");
//parse animators
int id1, id2;
float ratio;
- Ogre::vector<Ogre::String>::type options =
Ogre::StringUtil::split(String(line), ",");
+ Ogre::StringVector options =
Ogre::StringUtil::split(String(line), ",");
if (options.size() < 4)
{
LogManager::getSingleton().logMessage("Error
parsing File (Animator) " + String(fname) +" line " +
StringConverter::toString(linecounter) + ". trying to continue ...");
@@ -1346,7 +1348,7 @@
id2 = StringConverter::parseInt(options[1]);
ratio = StringConverter::parseReal(options[2]);
String optionStr = options[3];
- Ogre::vector<Ogre::String>::type optionArgs =
Ogre::StringUtil::split(optionStr, "|");
+ Ogre::StringVector optionArgs =
Ogre::StringUtil::split(optionStr, "|");
int htype=BEAM_HYDRO;
@@ -1563,12 +1565,14 @@
else if (mode==9)
{
//parse engine
+ printf(">>> engine\n");
if(driveable == MACHINE)
continue;
driveable=TRUCK;
- Ogre::vector<Ogre::String>::type tmp =
Ogre::StringUtil::split(line, ", ");
- if (tmp.size() < 7) {
+ Ogre::StringVector tmp =
Ogre::StringUtil::split(string(line), ", ");
+ if (tmp.size() < 7)
+ {
LogManager::getSingleton().logMessage("Error
parsing File (Engine) " + String(fname) +" line " +
StringConverter::toString(linecounter) + ". trying to continue ...");
continue;
}
@@ -1609,7 +1613,7 @@
engine->setAutoMode(MANUAL_STICK);
else if (gearboxMode == "Fully Manual: stick shift with
ranges")
engine->setAutoMode(MANUAL_RANGES);
-
+
//engine->start();
}
@@ -2977,6 +2981,7 @@
else if (mode==34)
{
// parse exhausts
+ printf(">>> exhausts\n");
if (disable_smoke)
continue;
int id1, id2;
@@ -3664,8 +3669,8 @@
}
int wheel_node[2][2] = {{0, 0}, {0, 0}};
- Ogre::vector<Ogre::String>::type options =
Ogre::StringUtil::split(line, ",");
- Ogre::vector<Ogre::String>::type::iterator cur =
options.begin();
+ Ogre::StringVector options =
Ogre::StringUtil::split(line, ",");
+ Ogre::StringVector::iterator cur = options.begin();
for(; cur != options.end(); ++cur)
{
@@ -3793,7 +3798,7 @@
}
if(nodenum >= free_node || nodenum < 0)
continue;
-
+
nodes[nodenum].collRadius = radius;
}
Modified: trunk/source/main/utils/language.cpp
===================================================================
--- trunk/source/main/utils/language.cpp 2011-02-13 13:40:27 UTC (rev
1670)
+++ trunk/source/main/utils/language.cpp 2011-02-13 14:43:37 UTC (rev
1671)
@@ -113,8 +113,8 @@
// only process valid lines
if(strncmp(line, "code_points ", 12) && strnlen(line, 50) > 13)
continue;
- Ogre::vector<String>::type args = StringUtil::split(line + 12,
" ");
- for(Ogre::vector<String>::type::iterator it=args.begin();
it!=args.end(); it++)
+ Ogre::StringVector args = StringUtil::split(line + 12, " ");
+ for(Ogre::StringVector::iterator it=args.begin();
it!=args.end(); it++)
{
Font::CodePointRange range;
StringVector itemVec = StringUtil::split(*it, "-");
@@ -148,4 +148,4 @@
//fontCacheInit("Cyberbit");
//generateAllFontTextures();
}
-#endif //NOLANG
\ No newline at end of file
+#endif //NOLANG
Modified: trunk/source/updater/ConfigManager.cpp
===================================================================
--- trunk/source/updater/ConfigManager.cpp 2011-02-13 13:40:27 UTC (rev
1670)
+++ trunk/source/updater/ConfigManager.cpp 2011-02-13 14:43:37 UTC (rev
1671)
@@ -384,17 +384,17 @@
} else if(list[0][0] == std::string("update") && list[0].size()
> 2)
{
// yay, an update
- LOG("new update available: %s %s\n",
list[0][1].c_str(), list[0][2]);
+ LOG("new update available: %s %s\n",
list[0][1].c_str(), list[0][2].c_str());
wsdl->setDownloadMessage(_T("downloading installer
update"));
// rename ourself, so we can replace ourself
LOG("renaming self...\n");
std::string myPath = conv(getExecutablePath());
-
+
// removing old, otherwise renaming trows exception
if(boost::filesystem::exists(myPath+std::string(".old")))
boost::filesystem::remove(myPath+std::string(".old"));
-
+
boost::filesystem::rename(myPath,
myPath+std::string(".old"));
LOG("downloading update...\n");
Modified: trunk/source/updater/wthread.cpp
===================================================================
--- trunk/source/updater/wthread.cpp 2011-02-13 13:40:27 UTC (rev 1670)
+++ trunk/source/updater/wthread.cpp 2011-02-13 14:43:37 UTC (rev 1671)
@@ -232,7 +232,7 @@
listFiles(path, files);
char tmp[256] = "";
updateCallback(MSE_UPDATE_TITLE, "Indexing local files ..");
- sprintf(tmp, "indexing %d files ...", files.size());
+ sprintf(tmp, "indexing %d files ...", (int)files.size());
LOG("%s\n", tmp);
updateCallback(MSE_STARTING, string(tmp));
int counter = 0, counterMax = files.size();
@@ -380,7 +380,7 @@
}
delete(dl);
-
+
string hashMyFileIndex = generateFileHash(myFileIndex);
string hashRemoteFileIndex = generateFileHash(remoteFileIndex);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel