void DreamsEngine::start() { // Global for the legacy refkeen code. gDreamsEngine = this; gpRenderLock = SDL_CreateSemaphore(1); gKeenFiles.setupFilenames(7); setScreenMode(3); dreamsengine_datapath = const_cast<char*>(mDataPath.c_str()); // This function extracts the embedded files. TODO: We should integrate that to our existing system // Load the Resources loadResources(); //RefKeen_Patch_id_ca(); //RefKeen_Patch_id_us(); RefKeen_Patch_id_rf(); setupObjOffset(); // TODO: This seems to be the exe with main cycle. We need to break it into draw and logic routines. //InitGame(); //DemoLoop(); //kdreams_exe_main(); mpScene.reset( new DreamsDosIntro ); gGameState = INTRO_TEXT; mpScene->start(); }
bool DreamsEngine::start() { CExeFile &ExeFile = gKeenFiles.exeFile; //mLoader.setPermilage(10); // Patch the EXE-File-Data directly in the memory. CPatcher Patcher(ExeFile, gBehaviorEngine.mPatchFname); Patcher.process(); //mLoader.setPermilage(50); extractEmbeddedFilesIntoMemory(g_be_gamever_kdreamse113); // Global for the legacy refkeen code. gDreamsEngine = this; //gpRenderLock = SDL_CreateSemaphore(1); gKeenFiles.setupFilenames(7); setScreenMode(3); dreamsengine_datapath = const_cast<char*>(mDataPath.c_str()); // This function extracts the embedded files. TODO: We should integrate that to our existing system // Load the Resources loadResources(); //RefKeen_Patch_id_ca(); //RefKeen_Patch_id_us(); RefKeen_Patch_id_rf(); setupObjOffset(); mpScene.reset( new DreamsDosIntro ); gGameStateChange = GSS_INTRO_TEXT; mpScene->start(); return true; }