Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv3576/Source
Modified Files:
CSPSim.cpp
Log Message:
Index: CSPSim.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/CSPSim.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** CSPSim.cpp 19 Jul 2003 14:08:03 -0000 1.32
--- CSPSim.cpp 19 Jul 2003 14:14:37 -0000 1.33
***************
*** 208,212 ****
void CSPSim::init()
{
! //try {
CSP_LOG(APP, INFO, "Starting CSPSim...");
--- 208,212 ----
void CSPSim::init()
{
! try {
CSP_LOG(APP, INFO, "Starting CSPSim...");
***************
*** 236,240 ****
m_DataManager.addArchive(sim);
}
-
catch (simdata::Exception &e) {
CSP_LOG(APP, ERROR, "Error opening data archive " << archive_file);
--- 236,239 ----
***************
*** 243,246 ****
--- 242,246 ----
//::exit(0);
}
+
// initialize SDL
initSDL();
***************
*** 260,263 ****
--- 260,265 ----
m_Clean = false;
+ CSP_LOG(APP, DEBUG, "INIT:: interface maps");
+
// load all interface maps and create a virtual hid for the active object
m_InterfaceMaps = new EventMapIndex();
***************
*** 265,268 ****
--- 267,272 ----
m_Interface = new VirtualHID();
+ CSP_LOG(APP, DEBUG, "INIT:: theater");
+
std::string theater = g_Config.getPath("Testing", "Theater", "sim:theater.balkan", false);
m_Theater = m_DataManager.getObject(theater.c_str());
***************
*** 272,278 ****
m_Terrain->activate();
! // eventually this will be set in an entirely different way...
! //m_ActiveTerrain = m_DataManager.getObject("sim:terrain.balkan");
! //m_ActiveTerrain->activate();
m_Scene = new VirtualScene();
--- 276,280 ----
m_Terrain->activate();
! CSP_LOG(APP, DEBUG, "INIT:: scene");
m_Scene = new VirtualScene();
***************
*** 280,283 ****
--- 282,287 ----
m_Scene->setTerrain(m_Terrain);
+ CSP_LOG(APP, DEBUG, "INIT:: battlefield");
+
m_Battlefield = new VirtualBattlefield();
m_Battlefield->create();
***************
*** 285,288 ****
--- 289,294 ----
m_Battlefield->setTheater(m_Theater);
+ CSP_LOG(APP, DEBUG, "INIT:: scene configuration");
+
// get view parameters from configuration file. ultimately there should
// be an in-game ui for this and probably a separate config file.
***************
*** 300,303 ****
--- 306,311 ----
// create a test object (other objects can be created via TestObjects.py)
+ CSP_LOG(APP, DEBUG, "INIT:: test vehicle");
+
std::string vehicle = g_Config.getPath("Testing", "Vehicle", "sim:vehicles.aircraft.m2k", false);
simdata::Ref<AircraftObject> ao = m_DataManager.getObject(vehicle.c_str());
***************
*** 324,328 ****
--- 332,341 ----
+ CSP_LOG(APP, DEBUG, "INIT:: activate test vehicle");
+
m_Battlefield->addUnit(ao);
+ setActiveObject(ao);
+
+ CSP_LOG(APP, DEBUG, "INIT:: gamescreen");
// Following variables should be set before calling GameScreen.init()
***************
*** 333,339 ****
//m_Paused = true;
- // start in the aircraft
- setActiveObject(ao);
-
// create and initialize screens
m_GameScreen = new GameScreen;
--- 346,349 ----
***************
*** 349,353 ****
changeScreen(m_GameScreen);
logoScreen.onExit();
- /*
}
catch(csp::Exception & pEx) {
--- 359,362 ----
***************
*** 363,367 ****
csp::OtherFatalException("initialization");
}
- */
}
--- 372,375 ----
|