| 164 | } |
| 165 | |
| 166 | void MapViewerApp::Start() |
| 167 | { |
| 168 | QSettings our_settings(QSettings::IniFormat,QSettings::UserScope,"SEGS","MapViewer"); |
| 169 | basepath = our_settings.value("ExtractedDir",QString()).toString(); |
| 170 | if(!basepath.endsWith('/')) |
| 171 | basepath+='/'; |
| 172 | CreateBaseScene(); |
| 173 | SetupViewport(); |
| 174 | CreateConsoleAndDebugHud(); |
| 175 | prepareCursor(); |
| 176 | |
| 177 | // Subscribe to key events |
| 178 | g_inputSignals.keyDown.Connect(this,&MapViewerApp::HandleKeyDown); |
| 179 | g_inputSignals.keyUp.Connect(this,&MapViewerApp::HandleKeyUp); |
| 180 | // Subscribe to update ticks |
| 181 | g_coreSignals.update.Connect(this,&MapViewerApp::HandleUpdate); |
| 182 | g_coreSignals.postRenderUpdate.Connect(this,&MapViewerApp::HandlePostRenderUpdate); |
| 183 | |
| 184 | Input* input = GetContext()->m_InputSystem.get(); |
| 185 | input->SetMouseMode(MM_FREE);//,MM_RELATIVE |
| 186 | |
| 187 | if(!getRuntimeData().prepare(basepath)) |
| 188 | { |
| 189 | QMessageBox::critical(nullptr,"Missing files","At least some of the required bin/* files are missing"); |
| 190 | exit(1); |
| 191 | } |
| 192 | |
| 193 | SEGS::preloadTextureNames(basepath); |
| 194 | prepareSideWindow(); |
| 195 | } |
| 196 | |
| 197 | void MapViewerApp::loadSelectedSceneGraph(const QString &path) |
| 198 | { |
no test coverage detected