MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / loadMenuDAT

Method loadMenuDAT

src/ui/Menu.cpp:164–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164bool 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
185Daedalus::GEngineClasses::C_Menu& UI::Menu::getScriptData()
186{

Callers

nothing calls this directly

Calls 1

getEngineArgsMethod · 0.80

Tested by

no test coverage detected