bool CBrokenPellerator::MovieEndMsg(CMovieEndMsg *msg) { if (msg->_endFrame == 14) { // Pellerator has been opened, so let the hose be picked up (if it's still there) CStatusChangeMsg statusMsg; statusMsg._newStatus = 1; statusMsg.execute("PickUpHose"); } if (msg->_endFrame == 28) { // Pellerator has been closed, so disable the hose (if it's still there) CStatusChangeMsg statusMsg; statusMsg._newStatus = 0; statusMsg.execute("PickUpHose"); } switch (_exitAction) { case 1: changeView(_exitLeftView); break; case 2: changeView(_exitRightView); break; default: break; } return true; }
bool CFanControl::TimerMsg(CTimerMsg *msg) { CStatusChangeMsg statusMsg; statusMsg._newStatus = 1; statusMsg.execute("StarlingPuret"); changeView("PromenadeDeck.Node 3.S"); changeView("PromenadeDeck.Node 3.E"); return true; }
bool CBottomOfWellMonitor::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (isEquals("BOWTelevisionMonitor")) { if (_tvPresent) changeView("BottomOfWell.Node 7.N", ""); } else { if (_headPresent) changeView("BottomOfWell.Node 8.N", ""); } return true; }
void GameMain::initGame(bool needCreate /*= false*/) { if (needCreate == true) { changeView(GameView::GV_CHAR_CREATOR); } else { changeView(GameView::GV_GENERAL); loadGameData(); } }
bool CArboretumGate::MovieEndMsg(CMovieEndMsg *msg) { setVisible(!_v3); if (_viewName1 != "NULL") { changeView(_viewName1); } else if (_viewName2 != "NULL") { changeView(_viewName2); _viewName2 = "NULL"; } return true; }
bool CMovePlayerToFrom::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (_string2.empty()) { changeView(_destination); } else { CViewItem *view = parseView(_string2); CViewItem *destView = parseView(_destination); CLinkItem *link = view->findLink(destView); changeView(_destination, link->getName()); } return true; }
bool CArboretumGate::MovieEndMsg(CMovieEndMsg *msg) { setVisible(!_disabled); if (_arboretumViewName != "NULL") { changeView(_arboretumViewName); } else if (_exitViewName != "NULL") { changeView(_exitViewName); _exitViewName = "NULL"; } return true; }
void IconListToolbar::viewMode_Click(){ if (this->view_mode == D_VIEW_MODE_ICON) { this->view_mode = D_VIEW_MODE_LIST; viewMode->setIcon(CoreLib->loadIcon("data/view-list-icons.png")); viewMode->setText(tr("Icons view mode")); viewMode->setStatusTip(tr("Icons view mode")); emit(changeView(0)); } else { this->view_mode = D_VIEW_MODE_ICON; viewMode->setIcon(CoreLib->loadIcon("data/view-list-details.png")); viewMode->setText(tr("Details view mode")); viewMode->setStatusTip(tr("Details view mode")); emit(changeView(1)); } }
bool CDeskbot::MovieEndMsg(CMovieEndMsg *msg) { bool flag = false; if (_npcFlags & NPCFLAG_10000) { if (_classNum) { petSetArea(PET_ROOMS); dec54(); unlockMouse(); playSound("z#47.wav"); _classNum = NO_CLASS; } _npcFlags &= ~NPCFLAG_10000; flag = true; } if (_npcFlags & NPCFLAG_40000) { _deskbotActive = false; _npcFlags &= ~(NPCFLAG_40000 | NPCFLAG_20000); if (_npcFlags & NPCFLAG_80000) { CTurnOn turnOn; turnOn.execute("EmbBellbotTrigger"); unlockMouse(); changeView("EmbLobby.Node 4.N", ""); } else if (_npcFlags & NPCFLAG_100000) { CTurnOn turnOn; turnOn.execute("EmbDoorBotTrigger"); unlockMouse(); changeView("EmbLobby.Node 4.N", ""); } _npcFlags &= ~(NPCFLAG_80000 | NPCFLAG_100000); flag = true; } if (_npcFlags & NPCFLAG_20000) { _npcFlags &= ~(NPCFLAG_40000 | NPCFLAG_20000); setTalking(this, true, findView()); _npcFlags |= NPCFLAG_START_IDLING; flag = true; } if (!flag) CTrueTalkNPC::MovieEndMsg(msg); return true; }
void keyboardUp(unsigned char key, int x, int y){ if(key == ' ' && mode == ADJUST_MODE){ glutTimerFunc(5000, change_player, 0); currentPlayer++; if(currentPlayer == 2){ currentPlayer = 0; } mainCamera.x = playerX[currentPlayer]; mainCamera.y = 1.8; mainCamera.z = playerZ[currentPlayer]; mainCamera.tX = ball.x; mainCamera.tY = ball.y; mainCamera.tZ = ball.z; mode = CATCH_MODE; } if(key == 'n'){ night = !night; } if(key == 'f'){ fog = !fog; } if(key == ' ' && mode == TURNING_MODE){ if(distance(ball.x, 0, ball.z, 0,0,15) < distance(mainCamera.x, 0, mainCamera.z, 0, 0, 15)){ ball.locked = true; mode = ADJUST_MODE; changeView(); } } keys[key] = false; }
bool CEnterSecClassState::StatusChangeMsg(CStatusChangeMsg *msg) { stopSound(_soundHandle); if (msg->_newStatus == _mode || (_mode == 2 && msg->_newStatus == 3)) { if (_mode == 2) { _soundHandle = queueSound("b#36.wav", _soundHandle); } else { _soundHandle = queueSound("b#31.wav", _soundHandle); } if (msg->_newStatus == 3) msg->_newStatus = 2; } else { changeView("SecClassLittleLift.Node 1.N"); if (msg->_newStatus == 1) { _soundHandle = queueSound("b#32.wav", _soundHandle); } else if (msg->_newStatus == 2) { _soundHandle = queueSound("b#25.wav", _soundHandle); } else if (msg->_newStatus == 3) { _soundHandle = queueSound("b#33.wav", _soundHandle); msg->_newStatus = 2; } } if (msg->_newStatus != 3) { if (msg->_newStatus == 2 && _mode == 1) playMovie(0, 10, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); else if (msg->_newStatus == 1) playMovie(11, 21, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); } _cursorId = msg->_newStatus == 2 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID; _mode = msg->_newStatus; return true; }
bool CEnterExitMiniLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (compareRoomNameTo("SgtLobby")) { _statics->_destView = getRoomNodeName() + ".S"; _statics->_destRoom = "SgtLobby"; changeView("SGTLittleLift.Node 1.E"); CPetControl *pet = getPetControl(); if (pet) pet->setRoomsRoomNum(_destRoomNum); } else if (compareRoomNameTo("SGTLittleLift")) { if (_statics->_changeViewFlag) { changeView(_statics->_destView); } } return true; }
bool CBottomOfWellMonitor::EnterViewMsg(CEnterViewMsg *msg) { if (_flag) { if (isEquals("BOWTelevisionMonitor")) { if (_tvPresent) { changeView("BottomOfWell.Node 7.N", ""); _flag = false; } } else { if (_headPresent) { changeView("BottomOfWell.Node 8.N", ""); _flag = false; } } } return true; }
bool CMovePlayerInParrotRoom::ActMsg(CActMsg *msg) { if (msg->_action == "PanAwayFromParrot") { unlockMouse(); changeView(_destination); } return true; }
bool CSGTNavigation::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (compareRoomNameTo("SgtLobby")) { _statics->_destView = getRoomNodeName(); _statics->_destRoom = "SgtLobby"; changeView("SGTState.Node 1.S"); } else if (compareRoomNameTo("SGTLittleLift")) { if (_statics->_changeViewNum != 1) { _statics->_destRoom = "SGTLittleLift"; changeView("SGTState.Node 1.S"); } } else if (compareRoomNameTo("SGTState")) { if (_statics->_destRoom == "SgtLobby") { if (compareViewNameTo("SGTState.Node 2.N")) { changeView("SGTState.Node 1.N"); _statics->_destView += ".S"; } else { _statics->_destView += ".N"; } changeView(_statics->_destView); } else if (_statics->_destRoom == "SGTLittleLift") { if (compareViewNameTo("SGTState.Node 1.S")) { changeView("SGTLittleLift.Node 1.N"); } else { changeView("SGTState.Node 1.N"); changeView("SGTLittleLift.Node 1.S"); } } } return true; }
bool CBrokenPellerator::ActMsg(CActMsg *msg) { if (msg->_action == "PlayerGetsHose") { _v2 = 1; loadFrame(43); CStatusChangeMsg statusMsg; statusMsg.execute("PickupHose"); } else { _exitAction = 0; bool closeFlag = msg->_action == "Close"; if (msg->_action == "CloseLeft") { closeFlag = true; _exitAction = 1; } if (msg->_action == "CloseRight") { closeFlag = true; _exitAction = 2; } if (closeFlag) { if (_v1) { _v1 = false; if (_v2) playMovie(43, 57, MOVIE_NOTIFY_OBJECT); else playMovie(14, 28, MOVIE_NOTIFY_OBJECT); } else { switch (_exitAction) { case 1: changeView(_exitLeftView); break; case 2: changeView(_exitRightView); break; default: break; } _exitAction = 0; } } } return true; }
void Resum::draw() { sf::Vector2f pos; changeView(pos); drawBorder(pos); drawText(pos); _window->setView(*_view); }
bool CBrokenPelleratorFroz::ActMsg(CActMsg *msg) { if (msg->_action == "PlayerGetsHose") { _v2 = 1; CStatusChangeMsg statusMsg; statusMsg._newStatus = 0; statusMsg.execute("FPickUpHose"); } else { _fieldE0 = 0; bool closeFlag = msg->_action == "Close"; if (msg->_action == "CloseLeft") { closeFlag = true; _fieldE0 = 1; } if (msg->_action == "CloseRight") { closeFlag = true; _fieldE0 = 2; } if (closeFlag) { if (_v1) { _v1 = false; if (_v2) playMovie(29, 42, MOVIE_NOTIFY_OBJECT); else playMovie(72, 84, MOVIE_NOTIFY_OBJECT); } else { switch (_fieldE0) { case 1: changeView(_string2); break; case 2: changeView(_string3); break; default: break; } _fieldE0 = 0; } } } return true; }
bool CEnterExitSecClassMiniLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (compareRoomNameTo("2ndClassLobby")) { _statics->_viewName = getRoomNodeName() + ".W"; changeView("SecClassLittleLift.Node 1.E"); _statics->_state = 1; CPetControl *pet = getPetControl(); if (pet) { pet->setRoomsRoomNum(_roomNum); pet->setRoomsSublevel(1); } } else if (compareRoomNameTo("SecClassLittleLift")) { if (_statics->_state == 1) { changeView(_statics->_viewName); } } return true; }
bool KVerbosDoc::openDocument(const KURL& url, const char *format /*=0*/) { bool b = false; QString tmpfile; KIO::NetAccess::download( url, tmpfile ); QFile file(url.path()); if ( file.open(IO_ReadOnly) ) { // file opened successfully deleteContents(); if ((url.fileName().right(4) == "html")||(url.fileName().right(3) == "htm")) { // qWarning("öffnen eines HTML-files"); b = openDocHTML(file); } else { // qWarning("öffnen eines .verbos-files"); b = openDocVERBOS(file); }; file.close(); // Liste der Verben sortieren spanishVerbList vl; spanishVerbList::Iterator it1 = verbList2.begin(); spanishVerbList::Iterator it2; while (it1 != verbList2.end()) { it2 = vl.begin(); bool inserted = false; while (it2 != vl.end()) { if (*it1 < *it2) { vl.insert(it2, *it1); inserted = true; it2 = vl.end(); } else it2++; }; if (!inserted) vl.insert(it2, *it1); it1++; }; verbList2.clear(); verbList2 = vl; benutzer->fillList(getList()); emit changeView(); }; KIO::NetAccess::removeTempFile( tmpfile ); modified=false; emit anzahlVerbenGeaendert(getAnzahl()); return b; }
bool CArboretumGate::ActMsg(CActMsg *msg) { if (msg->_action == "PlayerGetsSpeechCentre") { _v1 = 1; CVisibleMsg visibleMsg(true); visibleMsg.execute("SpCtrOverlay"); } else if (msg->_action == "ExitLFrozen") { if (_v3) { _viewName2 = "FrozenArboretum.Node 2.W"; CTurnOn onMsg; onMsg.execute(this); } else { changeView("FrozenArboretum.Node 2.W"); } } else if (msg->_action == "ExitRFrozen") { if (_v3) { _viewName2 = "FrozenArboretum.Node 2.E"; CTurnOn onMsg; onMsg.execute(this); } else { changeView("FrozenArboretum.Node 2.E"); } } else if (msg->_action == "ExitLNormal") { if (_v3) { _viewName2 = "Arboretum.Node 2.W"; CTurnOn onMsg; onMsg.execute(this); } else { changeView("Arboretum.Node 2.W"); } } else if (msg->_action == "ExitRNormal") { if (_v3) { _viewName2 = "Arboretum.Node 2.E"; CTurnOn onMsg; onMsg.execute(this); } else { changeView("Arboretum.Node 2.E"); } } return true; }
bool CScraliontisTable::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (_fieldEC) { changeView(_destination, _armPickedUp ? _armDestination : _armlessDestination); } else if (!_ticks || (getTicksCount() - _ticks) >= 5000) { CTriggerNPCEvent triggerMsg(119); triggerMsg.execute("MaitreD"); _ticks = getTicksCount(); } return true; }
bool CTitania::ActMsg(CActMsg *msg) { if (msg->_action == "SleepTitania") { setVisible(true); playCutscene(52, 104); playSound("z#47.wav", 100); changeView("Titania.Node 7.S", ""); petShow(); enableMouse(); CSetFrameMsg frameMsg; frameMsg.execute("Bomb"); } else if (msg->_action == "CheckHead") { CSenseWorkingMsg workingMsg1("Not Working"); CSenseWorkingMsg workingMsg2("Not Working"); CSenseWorkingMsg workingMsg3("Not Working"); CSenseWorkingMsg workingMsg4("Not Working"); if (_eye1 && _eye2) { workingMsg1._value = _visionCentre ? "Working" : "Random"; } if (_ear1 && _ear2) { workingMsg2._value = _auditoryCentre ? "Working" : "Random"; } if (_nose) { workingMsg4._value = _olfactoryCentre ? "Working" : "Random"; } if (_mouth) { workingMsg3._value = _speechCentre ? "Working" : "Random"; } if (_centralCore && _eye1 && _eye2 && _ear1 && _ear2 && _nose && _mouth && _speechCentre && _olfactoryCentre && _auditoryCentre) { playSound("z#47.wav"); CActMsg actMsg("Woken"); actMsg.execute("MouthSlot"); actMsg.execute("VisionCentreSlot"); setPassengerClass(UNCHECKED); addTimer(1000); } else { workingMsg1.execute("Eye1Slot"); workingMsg1.execute("Eye2Slot"); workingMsg2.execute("Ear1Slot"); workingMsg2.execute("Ear2Slot"); workingMsg3.execute("MouthSlot"); workingMsg4.execute("NoseSlot"); } } return true; }
bool CEnterSecClassState::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (getPassengerClass() > 2) { playSound("b#105.wav"); petDisplayMessage(1, CLASS_NOT_PERMITTED_IN_AREA); } else if (!compareRoomNameTo("SecClassLittleLift") || _mode == 2) { CActMsg actMsg(getFullViewName().deleteRight(3) + ".S"); actMsg.execute("SecClassRoomLeaver"); changeView("secClassState.Node 01.N"); } return true; }
bool CBrokenPelleratorFroz::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (_v1) { changeView(_v2 ? _string5 : _string4); } else { _v1 = true; if (_v2) { playMovie(0, 13, 0); } else { playMovie(43, 55, MOVIE_NOTIFY_OBJECT); } } return true; }
bool CBrokenPelleratorFroz::MovieEndMsg(CMovieEndMsg *msg) { if (msg->_endFrame == 55) { CStatusChangeMsg statusMsg; statusMsg._newStatus = 1; statusMsg.execute("FPickUpHose"); } if (msg->_endFrame == 84) { CStatusChangeMsg statusMsg; statusMsg._newStatus = 0; statusMsg.execute("FPickUpHose"); } if (_fieldE0 == 1) { changeView(_string2); _fieldE0 = 0; } else if (_fieldE0 == 2) { changeView(_string3); _fieldE0 = 0; } return true; }
void GameController::update(float time){ gravity(GRAVITY*time); hero.move(); collisionHero(); changeView(); for(int i=0; i<NB_PLAT; i++){ sf::FloatRect h=obstacleTab[i].getHitbox(); obstacle_display[i]=sf::RectangleShape(sf::Vector2f(h.width, h.height)); obstacle_display[i].setPosition(sf::Vector2f(h.left, h.top)); } obstacle_display[0].setFillColor(sf::Color(155,155,155,255)); obstacle_display[1].setFillColor(sf::Color(255,255,255,255)); hero_display=sf::RectangleShape(sf::Vector2f(hero.getHitbox().width, hero.getHitbox().height)); hero_display.setPosition(sf::Vector2f(hero.getX(), hero.getY())); }
void IconListToolbar::sortCreation_Click(){ emit(changeView(5)); if (this->sort_order == D_SORT_TYPE_BY_DATE_ASC){ this->sort_order = D_SORT_TYPE_BY_DATE_DSC; sortCreation->setStatusTip(tr("Sort ascending by create order")); sortCreation->setText(tr("Sort ascending by create order")); sortCreation->setIcon(CoreLib->loadIcon("data/sort-create-asc.png")); } else { this->sort_order = D_SORT_TYPE_BY_DATE_ASC; sortCreation->setStatusTip(tr("Sort descending by create order")); sortCreation->setText(tr("Sort descending by create order")); sortCreation->setIcon(CoreLib->loadIcon("data/sort-create-desc.png")); } sortAlpha->setStatusTip(tr("Alphabetic sort ascending")); sortAlpha->setText(tr("Alphabetic sort ascending")); sortAlpha->setIcon(CoreLib->loadIcon("data/sort-asc.png")); }
bool CLiftbotHead::MouseDragStartMsg(CMouseDragStartMsg *msg) { if (!checkStartDragging(msg)) { return false; } else if (compareViewNameTo("BottomOfWell.Node 8.N")) { changeView("BottomOfWell.Node 13.N"); moveToView(); CActMsg actMsg("LiftbotHeadTaken"); actMsg.execute("BOWLiftbotHeadMonitor"); return CCarry::MouseDragStartMsg(msg); } else if (_flag) { _flag = false; CActMsg actMsg("LoseHead"); actMsg.execute("FaultyLiftbot"); } return CCarry::MouseDragStartMsg(msg); }
bool CSGTNavigation::StatusChangeMsg(CStatusChangeMsg *msg) { CPetControl *pet = getPetControl(); if (isEquals("SGTLL")) { static const int FRAMES[7] = { 0, 149, 112, 74, 0, 36, 74 }; _statics->_changeViewNum = msg->_newStatus; if (pet->getRooms1CC() != _statics->_changeViewNum) { changeView("SGTLittleLift.Node 1.N"); } int startVal = pet->getRooms1CC(); if (startVal > _statics->_changeViewNum) playMovie(FRAMES[startVal], FRAMES[_statics->_changeViewNum], MOVIE_WAIT_FOR_FINISH); else playMovie(FRAMES[startVal + 3], FRAMES[_statics->_changeViewNum + 3], MOVIE_WAIT_FOR_FINISH); _cursorId = _statics->_changeViewNum != 1 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID; pet->setRooms1CC(_statics->_changeViewNum); pet->resetRoomsHighlight(); } return true; }