Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv26490
Modified Files:
AeroDynamics.cpp CSPSim.cpp Config.cpp ConsoleCommands.cpp
EventMapIndex.cpp GameScreen.cpp LogoScreen.cpp Makefile.in
MenuScreen.cpp ObjectModel.cpp ObjectRangeInfo.cpp
SimpleConfig.cpp TankObject.cpp TerrainObject.cpp
VirtualBattlefield.cpp base.cpp
Removed Files:
Platform.cpp
Log Message:
see CHANGES.current
Index: AeroDynamics.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/AeroDynamics.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** AeroDynamics.cpp 11 Apr 2003 23:43:06 -0000 1.14
--- AeroDynamics.cpp 12 Apr 2003 00:55:03 -0000 1.15
***************
*** 501,505 ****
// reduce to zero as speed drops
float v = V.Length();
! scale = scale / (1.0 + v);
// limit to 4G max
if (scale * v > m_Mass * 40.0) {
--- 501,505 ----
// reduce to zero as speed drops
float v = V.Length();
! scale = scale / (0.1 + v);
// limit to 4G max
if (scale * v > m_Mass * 40.0) {
Index: CSPSim.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/CSPSim.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** CSPSim.cpp 11 Apr 2003 23:43:06 -0000 1.19
--- CSPSim.cpp 12 Apr 2003 00:55:04 -0000 1.20
***************
*** 45,49 ****
#include "LogoScreen.h"
#include "LogStream.h"
- #include "Platform.h"
#include "SimObject.h"
#include "StaticObject.h"
--- 45,48 ----
***************
*** 55,58 ****
--- 54,58 ----
#include <SimData/DataArchive.h>
#include <SimData/Exception.h>
+ #include <SimData/FileUtility.h>
SDLWave m_audioWave;
***************
*** 189,193 ****
std::string data_path = g_Config.getPath("Paths", "DataPath", ".", true);
! std::string archive_file = ospath::join(data_path, "sim.dar");
// open the primary data archive
--- 189,193 ----
std::string data_path = g_Config.getPath("Paths", "DataPath", ".", true);
! std::string archive_file = simdata::ospath::join(data_path, "sim.dar");
// open the primary data archive
***************
*** 578,582 ****
std::string sound_path = g_Config.getPath("Paths", "SoundPath", ".", true);
! if ( SDL_LoadWAV(ospath::join(sound_path, "avionturbine5.wav").c_str(),
&m_audioWave.spec, &m_audioWave.sound, &m_audioWave.soundlen) == NULL ) {
CSP_LOG(CSP_APP, CSP_ERROR, "Couldn't load " << sound_path << "/avionturbine5.wav: " << SDL_GetError());
--- 578,582 ----
std::string sound_path = g_Config.getPath("Paths", "SoundPath", ".", true);
! if ( SDL_LoadWAV(simdata::ospath::join(sound_path, "avionturbine5.wav").c_str(),
&m_audioWave.spec, &m_audioWave.sound, &m_audioWave.soundlen) == NULL ) {
CSP_LOG(CSP_APP, CSP_ERROR, "Couldn't load " << sound_path << "/avionturbine5.wav: " << SDL_GetError());
Index: Config.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Config.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Config.cpp 21 Mar 2003 20:07:55 -0000 1.4
--- Config.cpp 12 Apr 2003 00:55:04 -0000 1.5
***************
*** 24,28 ****
#include "Config.h"
! #include "Platform.h"
/**
--- 24,28 ----
#include "Config.h"
! #include <SimData/FileUtility.h>
/**
***************
*** 33,37 ****
bool openConfig(std::string ini_path, bool report_error) {
! ini_path = ospath::filter(ini_path);
bool found_config = false;
try {
--- 33,37 ----
bool openConfig(std::string ini_path, bool report_error) {
! ini_path = simdata::ospath::filter(ini_path);
bool found_config = false;
try {
Index: ConsoleCommands.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/ConsoleCommands.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ConsoleCommands.cpp 21 Mar 2003 20:07:55 -0000 1.4
--- ConsoleCommands.cpp 12 Apr 2003 00:55:04 -0000 1.5
***************
*** 24,28 ****
- #include "stdinc.h"
#include "ConsoleCommands.h"
#include "Console.h"
--- 24,27 ----
Index: EventMapIndex.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/EventMapIndex.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** EventMapIndex.cpp 2 Feb 2003 20:53:28 -0000 1.3
--- EventMapIndex.cpp 12 Apr 2003 00:55:04 -0000 1.4
***************
*** 30,38 ****
#include "EventMapIndex.h"
#include "LogStream.h"
- #include "Platform.h"
#include <osgDB/FileUtils>
#include <osgDB/FileNameUtils>
#include <assert.h>
--- 30,39 ----
#include "EventMapIndex.h"
#include "LogStream.h"
#include <osgDB/FileUtils>
#include <osgDB/FileNameUtils>
+ #include <SimData/FileUtility.h>
+
#include <assert.h>
***************
*** 79,83 ****
dc = osgDB::getDirectoryContents(path);
for (file = dc.begin(); file != dc.end(); file++) {
! std::string fn = ospath::join(path, *file);
if (osgDB::getFileExtension(fn) != "hid") continue;
load(fn);
--- 80,84 ----
dc = osgDB::getDirectoryContents(path);
for (file = dc.begin(); file != dc.end(); file++) {
! std::string fn = simdata::ospath::join(path, *file);
if (osgDB::getFileExtension(fn) != "hid") continue;
load(fn);
Index: GameScreen.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/GameScreen.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** GameScreen.cpp 26 Mar 2003 10:57:16 -0000 1.11
--- GameScreen.cpp 12 Apr 2003 00:55:04 -0000 1.12
***************
*** 23,27 ****
**/
- #include "stdinc.h"
//#include <osg/DisplaySettings>
--- 23,26 ----
Index: LogoScreen.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/LogoScreen.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LogoScreen.cpp 19 Feb 2003 23:00:35 -0000 1.6
--- LogoScreen.cpp 12 Apr 2003 00:55:04 -0000 1.7
***************
*** 39,45 ****
#include "Config.h"
#include "LogoScreen.h"
- #include "Platform.h"
#include "Config.h"
--- 39,45 ----
#include "Config.h"
#include "LogoScreen.h"
#include "Config.h"
+ #include <SimData/FileUtility.h>
***************
*** 57,61 ****
{
std::string image_path = g_Config.getPath("Paths", "ImagePath", ".", true);
! std::string path = ospath::join(image_path, "CSPLogo.bmp");
m_image = SDL_LoadBMP(path.c_str());
if (m_image == NULL)
--- 57,61 ----
{
std::string image_path = g_Config.getPath("Paths", "ImagePath", ".", true);
! std::string path = simdata::ospath::join(image_path, "CSPLogo.bmp");
m_image = SDL_LoadBMP(path.c_str());
if (m_image == NULL)
Index: Makefile.in
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Makefile.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Makefile.in 11 Apr 2003 00:15:19 -0000 1.9
--- Makefile.in 12 Apr 2003 00:55:04 -0000 1.10
***************
*** 46,50 ****
ObjectModel.cpp \
ObjectRangeInfo.cpp \
- Platform.cpp \
ScreenInfo.cpp \
ScreenInfoManager.cpp \
--- 46,49 ----
Index: MenuScreen.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/MenuScreen.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MenuScreen.cpp 19 Feb 2003 23:00:35 -0000 1.4
--- MenuScreen.cpp 12 Apr 2003 00:55:04 -0000 1.5
***************
*** 24,29 ****
- #include "stdinc.h"
-
#include <osg/Node>
#include <osg/StateSet>
--- 24,27 ----
Index: ObjectModel.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/ObjectModel.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ObjectModel.cpp 11 Apr 2003 23:43:06 -0000 1.7
--- ObjectModel.cpp 12 Apr 2003 00:55:04 -0000 1.8
***************
*** 25,29 ****
#include "LogStream.h"
- #include "Platform.h"
#include "ObjectModel.h"
#include "Config.h"
--- 25,28 ----
***************
*** 38,41 ****
--- 37,42 ----
#include <osg/Geode>
+ #include <SimData/FileUtility.h>
+
SIMDATA_REGISTER_INTERFACE(ObjectModel)
***************
*** 186,190 ****
}
! std::string source = ospath::filter(ospath::join(g_ModelPath, m_ModelPath.getSource()));
CSP_LOG(CSP_APP, CSP_DEBUG, "ObjectModel::loadModel: " << source);
--- 187,191 ----
}
! std::string source = simdata::ospath::filter(simdata::ospath::join(g_ModelPath, m_ModelPath.getSource()));
CSP_LOG(CSP_APP, CSP_DEBUG, "ObjectModel::loadModel: " << source);
Index: ObjectRangeInfo.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/ObjectRangeInfo.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ObjectRangeInfo.cpp 2 Feb 2003 20:53:28 -0000 1.3
--- ObjectRangeInfo.cpp 12 Apr 2003 00:55:04 -0000 1.4
***************
*** 23,28 ****
**/
- #include "stdinc.h"
-
#include "ObjectRangeInfo.h"
--- 23,26 ----
Index: SimpleConfig.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/SimpleConfig.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SimpleConfig.cpp 22 Mar 2003 02:24:58 -0000 1.5
--- SimpleConfig.cpp 12 Apr 2003 00:55:04 -0000 1.6
***************
*** 38,42 ****
#include "SimpleConfig.h"
- #include "Platform.h"
#include <algorithm>
--- 38,41 ----
***************
*** 50,53 ****
--- 49,54 ----
#include STL_SSTREAM
+ #include <SimData/FileUtility.h>
+
// characters surrounding section names ('[' and ']' for typical windows .ini)
***************
*** 352,358 ****
std::string SimpleConfig::getPath(const std::string §ion, const std::string &key, std::string default_, bool set) {
ConfigValue *v = _find(section, key);
! std::string native = ospath::filter(default_);
if (v) {
! return ospath::filter(v->getValue());
} else
if (set) {
--- 353,359 ----
std::string SimpleConfig::getPath(const std::string §ion, const std::string &key, std::string default_, bool set) {
ConfigValue *v = _find(section, key);
! std::string native = simdata::ospath::filter(default_);
if (v) {
! return simdata::ospath::filter(v->getValue());
} else
if (set) {
***************
*** 397,401 ****
void SimpleConfig::setPath(const std::string §ion, const std::string &key, const std::string &value) {
ConfigValue *v = _find(section, key);
! std::string native = ospath::filter(value);
if (v) {
v->setValue(native);
--- 398,402 ----
void SimpleConfig::setPath(const std::string §ion, const std::string &key, const std::string &value) {
ConfigValue *v = _find(section, key);
! std::string native = simdata::ospath::filter(value);
if (v) {
v->setValue(native);
Index: TankObject.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/TankObject.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TankObject.cpp 2 Feb 2003 20:53:28 -0000 1.3
--- TankObject.cpp 12 Apr 2003 00:55:05 -0000 1.4
***************
*** 23,28 ****
**/
- #include "stdinc.h"
-
#include "SimObject.h"
--- 23,26 ----
Index: TerrainObject.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/TerrainObject.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** TerrainObject.cpp 22 Mar 2003 11:52:41 -0000 1.11
--- TerrainObject.cpp 12 Apr 2003 00:55:05 -0000 1.12
***************
*** 4,12 ****
#include "Config.h"
#include "LogStream.h"
- #include "Platform.h"
#include "TerrainObject.h"
#include "VirtualBattlefield.h"
#include <SimData/InterfaceRegistry.h>
extern int g_ScreenWidth;
--- 4,12 ----
#include "Config.h"
#include "LogStream.h"
#include "TerrainObject.h"
#include "VirtualBattlefield.h"
#include <SimData/InterfaceRegistry.h>
+
extern int g_ScreenWidth;
Index: VirtualBattlefield.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/VirtualBattlefield.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** VirtualBattlefield.cpp 21 Mar 2003 20:07:57 -0000 1.11
--- VirtualBattlefield.cpp 12 Apr 2003 00:55:05 -0000 1.12
***************
*** 33,46 ****
#include <osg/ColorMatrix>
#include <osg/LightSource>
-
#include <osgDB/FileUtils>
-
#include <osgUtil/CullVisitor>
#include <osgUtil/DisplayListVisitor>
#include "Config.h"
#include "CSPSim.h"
#include "LogStream.h"
- #include "Platform.h"
#ifdef SHADOW
--- 33,45 ----
#include <osg/ColorMatrix>
#include <osg/LightSource>
#include <osgDB/FileUtils>
#include <osgUtil/CullVisitor>
#include <osgUtil/DisplayListVisitor>
+ #include <SimData/FileUtility.h>
+
#include "Config.h"
#include "CSPSim.h"
#include "LogStream.h"
#ifdef SHADOW
***************
*** 214,220 ****
std::string font_path = g_Config.getPath("Paths", "FontPath", ".", true);
std::string search_path;
! ospath::addpath(search_path, image_path);
! ospath::addpath(search_path, model_path);
! ospath::addpath(search_path, font_path);
osgDB::setDataFilePathList(search_path);
--- 213,219 ----
std::string font_path = g_Config.getPath("Paths", "FontPath", ".", true);
std::string search_path;
! simdata::ospath::addpath(search_path, image_path);
! simdata::ospath::addpath(search_path, model_path);
! simdata::ospath::addpath(search_path, font_path);
osgDB::setDataFilePathList(search_path);
Index: base.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/base.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** base.cpp 19 Feb 2003 11:41:58 -0000 1.4
--- base.cpp 12 Apr 2003 00:55:05 -0000 1.5
***************
*** 23,27 ****
**/
- #include "stdinc.h"
#include <cmath>
--- 23,26 ----
--- Platform.cpp DELETED ---
|