| 162 | } |
| 163 | |
| 164 | bool UI::Menu::loadMenuDAT() |
| 165 | { |
| 166 | if (m_pVM) |
| 167 | return true; // Nothing to do, already loaded |
| 168 | |
| 169 | std::string datPath = "/_work/data/Scripts/_compiled/MENU.DAT"; |
| 170 | std::string datFile = Utils::getCaseSensitivePath(datPath, m_Engine.getEngineArgs().gameBaseDirectory); |
| 171 | |
| 172 | if (!Utils::fileExists(datFile)) |
| 173 | { |
| 174 | LogError() << "Failed to find MENU.DAT at: " << datFile; |
| 175 | return false; |
| 176 | } |
| 177 | |
| 178 | // Load DAT-File... |
| 179 | m_pVM = new Daedalus::DaedalusVM(datFile); |
| 180 | Daedalus::registerGothicEngineClasses(*m_pVM); |
| 181 | |
| 182 | return true; |
| 183 | } |
| 184 | |
| 185 | Daedalus::GEngineClasses::C_Menu& UI::Menu::getScriptData() |
| 186 | { |
nothing calls this directly
no test coverage detected