From: <mk...@us...> - 2003-10-11 17:47:19
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source In directory sc8-pr-cvs1:/tmp/cvs-serv10426/Source Modified Files: Tag: systems CSPSim.cpp Log Message: Index: CSPSim.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/CSPSim.cpp,v retrieving revision 1.36.2.2 retrieving revision 1.36.2.3 diff -C2 -d -r1.36.2.2 -r1.36.2.3 *** CSPSim.cpp 29 Sep 2003 06:46:11 -0000 1.36.2.2 --- CSPSim.cpp 11 Oct 2003 17:47:15 -0000 1.36.2.3 *************** *** 125,129 **** m_MainMenuScreen = NULL; - m_Interface = NULL; m_Battlefield = NULL; m_Scene = NULL; --- 125,128 ---- *************** *** 168,173 **** simdata::hasht classhash = m_ActiveObject->getPath(); printf("getting map for %s\n", classhash.str().c_str()); ! EventMapping *map = m_InterfaceMaps->getMap(classhash); ! printf("selecting map @ %p\n", map); m_Interface->setMapping(map); } --- 167,172 ---- simdata::hasht classhash = m_ActiveObject->getPath(); printf("getting map for %s\n", classhash.str().c_str()); ! simdata::Ref<EventMapping> map = m_InterfaceMaps->getMap(classhash); ! printf("selecting map @ %p\n", map.get()); m_Interface->setMapping(map); } *************** *** 400,408 **** assert(m_Terrain.valid()); assert(m_GameScreen); - assert(m_InterfaceMaps); setActiveObject(NULL); delete m_GameScreen; m_GameScreen = NULL; - delete m_InterfaceMaps; m_InterfaceMaps = NULL; m_Terrain->deactivate(); --- 399,405 ---- *************** *** 599,603 **** CSP_LOG(APP, DEBUG, "CSPSim::doInput()..."); ! VirtualHID *screen_interface = m_CurrentScreen->getInterface(); SDL_Event event; --- 596,600 ---- CSP_LOG(APP, DEBUG, "CSPSim::doInput()..."); ! simdata::Ref<VirtualHID> screen_interface = m_CurrentScreen->getInterface(); SDL_Event event; *************** *** 619,633 **** } if (!handled && m_CurrentScreen) { ! if (screen_interface) { handled = screen_interface->onEvent(event); } } ! if (!handled && m_Interface) { handled = m_Interface->onEvent(event); } } // run input scripts ! if (screen_interface) screen_interface->onUpdate(dt); ! if (m_Interface) m_Interface->onUpdate(dt); } --- 616,634 ---- } if (!handled && m_CurrentScreen) { ! if (screen_interface.valid()) { handled = screen_interface->onEvent(event); } } ! if (!handled && m_Interface.valid()) { handled = m_Interface->onEvent(event); } } // run input scripts ! if (screen_interface.valid()) { ! screen_interface->onUpdate(dt); ! } ! if (m_Interface.valid()) { ! m_Interface->onUpdate(dt); ! } } *************** *** 766,767 **** --- 767,773 ---- return m_Theater; } + + simdata::Ref<EventMapIndex> CSPSim::getInterfaceMaps() const { + return m_InterfaceMaps; + } + |