void IgorEngine::PART_18_ACTION_109() { const int offset = 29480; for (int i = 1; i <= 2; ++i) { for (int j = 1; j <= 48; ++j) { memcpy(_screenVGA + j * 320 + offset, _animFramesBuffer + (i - 1) * 1519 + j * 31, 31); } waitForTimer(120); } int part = _currentPart; _currentPart = 191; fadeOutPalette(768); PART_19(); memcpy(_screenVGA, _screenLayer2, 46080); loadResourceData__ROOM_MenToilets(); loadResourceData__ANIM_MenToilets(); loadActionData(DAT_MenToilets); _roomDataOffsets = PART_18_ROOM_DATA_OFFSETS; setRoomWalkBounds(0, 0, 319, 143); SET_EXEC_ACTION_FUNC(1, &IgorEngine::PART_18_EXEC_ACTION); PART_18_HELPER_1(255); memset(_screenVGA + 46080, 0, 17920); drawVerbsPanel(); removeObjectFromInventory(53); fadeInPalette(768); _currentPart = part; ADD_DIALOGUE_TEXT(215, 1); SET_DIALOGUE_TEXT(1, 1); startIgorDialogue(); }
void IgorEngine::PART_19() { _gameState.enableLight = 1; loadRoomData(PAL_WomenToilets, IMG_WomenToilets, BOX_WomenToilets, MSK_WomenToilets, TXT_WomenToilets); static const int anm[] = { FRM_WomenToilets1, FRM_WomenToilets2, FRM_WomenToilets3, FRM_WomenToilets4, FRM_WomenToilets5, 0 }; loadAnimData(anm); loadActionData(DAT_WomenToilets); _roomDataOffsets = PART_19_ROOM_DATA_OFFSETS; setRoomWalkBounds(0, 0, 319, 143); if (_currentPart == 191) { PART_19_HELPER_2(); } else { SET_EXEC_ACTION_FUNC(1, &IgorEngine::PART_19_EXEC_ACTION); PART_19_HELPER_1(255); } memcpy(_screenVGA, _screenLayer1, 46080); _currentAction.verb = kVerbWalk; fadeInPalette(768); PART_19_HELPER_3(); if (_objectsState[59] == 0) { PART_19_HELPER_4(); } else { enterPartLoop(); while (_currentPart == 190) { runPartLoop(); } leavePartLoop(); } fadeOutPalette(624); }
void IgorEngine::PART_25() { _gameState.enableLight = 2; loadRoomData(PAL_CollegeCorridorAnnouncementBoard, IMG_CollegeCorridorAnnouncementBoard, BOX_CollegeCorridorAnnouncementBoard, MSK_CollegeCorridorAnnouncementBoard, TXT_CollegeCorridorAnnouncementBoard); static const int anm[] = { FRM_CollegeCorridorAnnouncementBoard1, FRM_CollegeCorridorAnnouncementBoard2, 0 }; loadAnimData(anm); loadActionData(DAT_CollegeCorridorAnnouncementBoard); _roomDataOffsets = PART_25_ROOM_DATA_OFFSETS; setRoomWalkBounds(0, 0, 319, 143); SET_EXEC_ACTION_FUNC(1, &IgorEngine::PART_25_EXEC_ACTION); PART_25_HELPER_1(255); memcpy(_screenVGA, _screenLayer1, 46080); _currentAction.verb = kVerbWalk; fadeInPalette(768); if (_currentPart == 250) { PART_25_HELPER_2(); } else if (_currentPart == 251) { PART_25_HELPER_3(); } else if (_currentPart == 252) { PART_25_HELPER_4(); } enterPartLoop(); while (_currentPart >= 250 && _currentPart <= 252) { runPartLoop(); } leavePartLoop(); fadeOutPalette(624); }
void IgorEngine::PART_04() { if (_objectsState[106] == 1) { _currentPart = 730; playMusic(1); return; } if (_objectsState[107] == 1) { _objectsState[107] = 0; _currentPart = 750; playMusic(1); return; } _gameState.enableLight = 1; loadRoomData(PAL_Map, IMG_Map, BOX_Map, MSK_Map, TXT_Map); loadActionData(DAT_Map); _roomDataOffsets = PART_04_ROOM_DATA_OFFSETS; SET_EXEC_ACTION_FUNC(1, &IgorEngine::PART_04_EXEC_ACTION); PART_04_CLEAR_OBJECT_STATE_84(255); memcpy(_screenVGA, _screenLayer1, 46080); fadeInPalette(768); _currentAction.verb = kVerbWalk; if (_gameState.musicNum != 2) { playMusic(2); } _walkData[0].x = 160; _walkData[0].y = 133; _walkData[0].scaleWidth = 49; _walkData[0].scaleHeight = 49; _walkDataLastIndex = 1; _walkDataCurrentIndex = 1; enterPartLoop(); while (_currentPart == 40) { handleRoomInput(); if (compareGameTick(19, 32)) { handleRoomDialogue(); } if (compareGameTick(4, 8)) { handleRoomInventoryScroll(); } scrollPalette(200, 207); setPaletteRange(200, 207); if (compareGameTick(1)) { handleRoomLight(); } scrollPalette(184, 199); setPaletteRange(184, 199); waitForTimer(); } leavePartLoop(); fadeOutPalette(624); }
//========================================================================== void Initialise(IComponentContext& contextManager) override { // register reflected type definition IDefinitionManager* defManager = contextManager.queryInterface<IDefinitionManager>(); assert(defManager != nullptr); this->initReflectedTypes(*defManager); auto pDefinition = defManager->getDefinition(getClassIdentifier<ProjectManager>()); assert(pDefinition != nullptr); projectManager_ = pDefinition->create(); projectManager_.getBase<ProjectManager>()->init(contextManager); auto uiFramework = contextManager.queryInterface<IUIFramework>(); auto uiApplication = contextManager.queryInterface<IUIApplication>(); assert(uiFramework != nullptr && uiApplication != nullptr); uiFramework->loadActionData(":/TestingProjectControl/actions.xml", IUIFramework::ResourceType::File); newProject_ = uiFramework->createAction("NewProject", std::bind(&EnvrionmentTestPlugin::newProject, this)); openProject_ = uiFramework->createAction("OpenProject", std::bind(&EnvrionmentTestPlugin::openProject, this), std::bind(&EnvrionmentTestPlugin::canOpen, this)); saveProject_ = uiFramework->createAction("SaveProject", std::bind(&EnvrionmentTestPlugin::saveProject, this), std::bind(&EnvrionmentTestPlugin::canSave, this)); closeProject_ = uiFramework->createAction("CloseProject", std::bind(&EnvrionmentTestPlugin::closeProject, this), std::bind(&EnvrionmentTestPlugin::canClose, this)); uiApplication->addAction(*newProject_); uiApplication->addAction(*openProject_); uiApplication->addAction(*saveProject_); uiApplication->addAction(*closeProject_); auto viewCreator = get<IViewCreator>(); if (viewCreator) { viewCreator->createWindow( "TestingProjectControl/NewProjectDialog.qml", projectManager_, [this](std::unique_ptr<IWindow>& window) { newProjectDialog_ = std::move(window); if (newProjectDialog_ != nullptr) { connections_ += newProjectDialog_->signalClose.connect(std::bind(&EnvrionmentTestPlugin::onNewDlgClose, this)); } }); } }
void IgorEngine::PART_18() { _gameState.enableLight = 1; loadResourceData__ROOM_MenToilets(); loadResourceData__ANIM_MenToilets(); loadActionData(DAT_MenToilets); _roomDataOffsets = PART_18_ROOM_DATA_OFFSETS; setRoomWalkBounds(0, 0, 319, 143); SET_EXEC_ACTION_FUNC(1, &IgorEngine::PART_18_EXEC_ACTION); PART_18_HELPER_1(255); memcpy(_screenVGA, _screenLayer1, 46080); _currentAction.verb = kVerbWalk; fadeInPalette(768); PART_18_HELPER_2(); enterPartLoop(); while (_currentPart == 180) { runPartLoop(); } leavePartLoop(); fadeOutPalette(624); }
bool CustomUIThemesDialog::createDialog() { auto uiFramework = this->get<IUIFramework>(); auto uiApplication = this->get<IUIApplication>(); if ((uiFramework == nullptr) || (uiApplication == nullptr)) { return false; } uiFramework->loadActionData(":/WGCustomUIThemes/actions.xml", IUIFramework::ResourceType::File); actions_.push_back(uiFramework->createAction("showThemeDialog", std::bind(&CustomUIThemesDialog::actionShowDialog, this, std::placeholders::_1))); actions_.push_back(uiFramework->createAction("darkThemeAction", std::bind(&CustomUIThemesDialog::setTheme, this, std::placeholders::_1, Palette::Dark), [](const IAction*) { return true; }, std::bind(&CustomUIThemesDialog::getIsCurrentTheme, this, std::placeholders::_1, Palette::Dark) )); actions_.push_back(uiFramework->createAction("lightThemeAction", std::bind(&CustomUIThemesDialog::setTheme, this, std::placeholders::_1, Palette::Light), [](const IAction*) { return true; }, std::bind(&CustomUIThemesDialog::getIsCurrentTheme, this, std::placeholders::_1, Palette::Light) )); actions_.push_back(uiFramework->createAction("battleRedThemeAction", std::bind(&CustomUIThemesDialog::setTheme, this, std::placeholders::_1, Palette::BattleRed), [](const IAction*) { return true; }, std::bind(&CustomUIThemesDialog::getIsCurrentTheme, this, std::placeholders::_1, Palette::BattleRed) )); actions_.push_back(uiFramework->createAction("armyBrownThemeAction", std::bind(&CustomUIThemesDialog::setTheme, this, std::placeholders::_1, Palette::ArmyBrown), [](const IAction*) { return true; }, std::bind(&CustomUIThemesDialog::getIsCurrentTheme, this, std::placeholders::_1, Palette::ArmyBrown) )); actions_.push_back(uiFramework->createAction("airForceGreenThemeAction", std::bind(&CustomUIThemesDialog::setTheme, this, std::placeholders::_1, Palette::AirForceGreen), [](const IAction*) { return true; }, std::bind(&CustomUIThemesDialog::getIsCurrentTheme, this, std::placeholders::_1, Palette::AirForceGreen) )); actions_.push_back(uiFramework->createAction("navyBlueThemeAction", std::bind(&CustomUIThemesDialog::setTheme, this, std::placeholders::_1, Palette::NavyBlue), [](const IAction*) { return true; }, std::bind(&CustomUIThemesDialog::getIsCurrentTheme, this, std::placeholders::_1, Palette::NavyBlue) )); actions_.push_back(uiFramework->createAction("customThemeAction", std::bind(&CustomUIThemesDialog::setTheme, this, std::placeholders::_1, Palette::Custom), [](const IAction*) { return true; }, std::bind(&CustomUIThemesDialog::getIsCurrentTheme, this, std::placeholders::_1, Palette::Custom) )); for (auto& action : actions_) { uiApplication->addAction(*action); } return true; }