Surface *Surface::getScreen(uint16 resourceId) { MemoryBlock *block = Disk::getReference().getEntry(resourceId); PictureDecoder d; MemoryBlock *decodedData = d.decode(block); delete block; return new Surface(decodedData, FULL_SCREEN_WIDTH, decodedData->size() / FULL_SCREEN_WIDTH); }
Menu::Menu() { int_menu = this; StringList &sl = Resources::getReference().stringList(); Common::Language language = LureEngine::getReference().getLanguage(); MemoryBlock *data = Disk::getReference().getEntry(MENU_RESOURCE_ID); PictureDecoder decoder; _menu = decoder.decode(data, SCREEN_SIZE); delete data; const MenuRecordLanguage *rec = &menuList[0]; while ((rec->language != Common::UNK_LANG) && (rec->language != language)) ++rec; if (rec->language == Common::UNK_LANG) error("Unknown language encountered in top line handler"); _menus[0] = new MenuRecord(&rec->menus[0], 1, sl.getString(S_CREDITS)); _menus[1] = new MenuRecord(&rec->menus[1], 3, sl.getString(S_RESTART_GAME), sl.getString(S_SAVE_GAME), sl.getString(S_RESTORE_GAME)); _menus[2] = new MenuRecord(&rec->menus[2], 3, sl.getString(S_QUIT), sl.getString(S_SLOW_TEXT), sl.getString(S_SOUND_ON)); _selectedMenu = NULL; }