void DrasculaEngine::hipo_sin_nadie(int counter){ int y = 0, trackCharacter = 0; if (currentChapter == 3) y = -1; do { counter--; copyBackground(); if (currentChapter == 3) updateScreen(0, 0, 0, y, 320, 200, screenSurface); else updateScreen(0, 1, 0, y, 320, 198, screenSurface); if (trackCharacter == 0) y++; else y--; if (currentChapter == 3) { if (y == 1) trackCharacter = 1; if (y == -1) trackCharacter = 0; } else { if (y == 2) trackCharacter = 1; if (y == 0) trackCharacter = 0; } } while (counter > 0); copyBackground(); updateScreen(); }
// Use void SSD1351::TestPattern(uint8_t mode) { // Simple test pattern -- fade white in and out int delayTime = 1; // Display test pattern for (uint16_t c=0; c<255; c+= 1) { uint8_t r = 0; uint8_t g = 0; uint8_t b = 0; if (mode & B00000001) r = c; if (mode & B00000010) g = c; if (mode & B00000100) b = c; fillRect(0, 0, 128, 128, RGB(r, g, b)); updateScreen(); delay(delayTime); } // Display test pattern for (uint16_t c=255; c>0; c-= 1) { uint8_t r = 0; uint8_t g = 0; uint8_t b = 0; if (mode & B00000001) r = c; if (mode & B00000010) g = c; if (mode & B00000100) b = c; fillRect(0, 0, 128, 128, RGB(r, g, b)); updateScreen(); delay(delayTime); } }
void OEMFGame :: die() { musicPlayer->playSound(sounds[SND_OHNO]); m_player->m_vy = 0.0f; m_level->moveObject(m_player, m_level->startX() * 32, m_level->startY() * 32); if (m_lives > 0) { m_lives -= 1; darkenRect(160, 128, 320, 48); char msg[256]; sprintf(msg, "You died! Lives left: x%2d", m_lives); fonts[FNT_AMIGA]->blitText(this, msg, 0xFF7700, 176, 128 + 16, 320 - 32, false); blitImage(images[IMG_OEMFOEMINI], 160 + 112 + 80, 128 + 16); updateScreen(); SDL_Delay(2000); fadeOut(); } else { // GAME OVER! m_done = 1; darkenRect(160, 128, 320, 48); fonts[FNT_AMIGA]->blitCenterText(this, string("GAME OVER!"), 0xFF0000, 128 + 16, m_screenWidth, false); updateScreen(); SDL_Delay(3000); fadeOut(); } }
bool DrasculaEngine::confirmExit() { byte key = 0; color_abc(kColorRed); updateRoom(); centerText(_textsys[1], 160, 87); updateScreen(); delay(100); while (!shouldQuit()) { key = getScan(); if (key != 0) break; // This gives a better feedback to the user when he is asked to // confirm whether he wants to quit. It now still updates the room and // shows mouse cursor movement. Hopefully it will work in all // locations of the game. updateRoom(); color_abc(kColorRed); centerText(_textsys[1], 160, 87); updateScreen(); } if (key == Common::KEYCODE_ESCAPE || shouldQuit()) { stopMusic(); return false; } return true; }
void OEMFIntro :: run(void) { // small hack to display "loading..." without the amiga rom being loaded OEMFImage * amigarom = new OEMFImage(PREPATH "font.png"); OEMFFontFactory * tempfont = new OEMFFontFactory(amigarom, 32, 127, 8, 16, 96); delete amigarom; tempfont->blitCenterText(this, "Loading...", 0xFFFFFF00, 216, m_screenWidth); updateScreen(); delete tempfont; // loading... setLoadProgressCB(progress, this); loadFilesIntoDataMemory("resources.def"); clearRectWithColor(0, 216, 640, 16, 0xFF000000, false); updateScreen(); #ifndef __DEBUG__ OEMFFontFactory * ff = fonts[FNT_AMIGA]; OEMFFontFactory * menufont = fonts[FNT_MENU]; OEMFImage * oemfoelogo = images[IMG_INTRO]; // loading done //ripEffect(224, 16); SDL_Delay(1000); fadeOut(); //clearWithColor(0xFFFFFF); //blitImage(images[IMG_SDL], (m_screenWidth - images[IMG_SDL]->width()) / 2, 120); // ff->blitCenterText(this, "http://www.libsdl.org", 0x330077, 400, m_screenWidth, false); // updateScreen(); // SDL_Delay(3000); // fadeOut(); ff->blitCenterText(this, "Royal Belgian Beer Squadron", 0xFFFFFFFF, 224, m_screenWidth); SDL_UpdateRect(m_screen, 0, 0, m_screenWidth, m_screenHeight); SDL_Delay(1500); //ripEffect(224, 16); fadeOut(); ff->blitCenterText(this, "presents...", 0xFFFFFFFF, 224, m_screenWidth); SDL_UpdateRect(m_screen, 0, 0, m_screenWidth, m_screenHeight); SDL_Delay(1500); //ripEffect(224, 16); fadeOut(); // draw welcome screen blitImage(oemfoelogo, 0, 0); ff->blitCenterText(this, "Idea: Oemfoe", 0xFFFFFFFF, 192+192, m_screenWidth, true); ff->blitCenterText(this, "Coding: Oemfoe", 0xFFFFFFFF, 208+192, m_screenWidth, true); ff->blitCenterText(this, "GFX: Kuroto", 0xFFFFFFFF, 224+192, m_screenWidth, true); ff->blitCenterText(this, "Music: Belief Systems*", 0xFFFFFFFF, 240+192, m_screenWidth, true); SDL_UpdateRect(m_screen, 0, 0, m_screenWidth, m_screenHeight); SDL_Delay(3000); #endif if (musicPlayer->isPlayingSong()) musicPlayer->stopSong(); }
//************************************* //Função Main //************************************* int main() { init(); MIDI *music = load_midi("graphics/music.mid"); play_midi(music,TRUE); int loop = true; while(loop){ objects *obj = (objects*)malloc(sizeof(objects)); spaceship *ship = (spaceship*)malloc(sizeof(spaceship)); obj->ship = ship; setShipSprite(obj->ship); game_option escolha; escolha = callMenu(); switch(escolha){ case EASY_GAME: ship->speed = 1; break; case MEDIUM_GAME: ship->speed = 3; break; case HARD_GAME: ship->speed = 5; break; case EXIT_GAME: loop = FALSE; break; } int level = 1; while(loop&&level<=6){ char path[100] = "graphics/"; char filename[100]; sprintf(filename,"stage%d.w3d",level); strcat(path,filename); FILE *stage = fopen(path,"rb"); getAllCells(obj,stage); fclose(stage); game_condition progress; int background = backgroundColor(level); progress = gameLoop(obj,background); switch(progress){ case NEXT_STAGE: level++; break; case GAME_OVER:{ BITMAP *gameOver; gameOver = load_bitmap("graphics/gameover.bmp",NULL); updateScreen(gameOver); rest(2000); level = 100; }break; case LEAVE_GAME: loop = FALSE; break; } } if(level==7){ BITMAP *win; win = load_bitmap("graphics/venceu.bmp",NULL); updateScreen(win); rest(2000); } } deinit(); return 0; }
int monsterFight(struct gameData * bigPicPtr, int pos) { int r; double dam; char string[50]; if(bigPicPtr->MonstData[pos][2] <= 0) { return 1; } else { // Player attack r = rand() % 5; dam = bigPicPtr->atk * r; dam = dam + (1.50 * bigPicPtr->scAct) * dam; bigPicPtr->scAct = 0; // Deactivating scroll bigPicPtr->MonstData[pos][2] = bigPicPtr->MonstData[pos][2] - dam; sprintf(string, "|> You have caused %.0f of damage! [key]", dam); printMessage(bigPicPtr->sysRow, string); updateScreen(bigPicPtr); getch(); // Monster attack r = rand() % 5; dam = 10 * r; bigPicPtr->hp = bigPicPtr->hp - dam; if(bigPicPtr->hp <= 0) bigPicPtr->hp = 0; sprintf(string, "|> You have taken %.0f of damage! [key]", dam); printMessage(bigPicPtr->sysRow, string); updateScreen(bigPicPtr); getch(); printMessage(bigPicPtr->sysRow, "|>"); if (bigPicPtr->hp == 0) { printMessage(bigPicPtr->sysRow, "|> You are DEAD! [key to quit]"); getch(); bigPicPtr->play = 0; } else if (bigPicPtr->MonstData[pos][2] <= 0) { printMessage(bigPicPtr->sysRow, "|> You have defeated the monster! [key]"); updateScreen(bigPicPtr); getch(); printMessage(bigPicPtr->sysRow, "|> Experience gained (+50)!"); bigPicPtr->exp = bigPicPtr->exp + 50; return 1; } else { return 0; } } return 0; }
void OSystem_IPHONE::handleEvent_orientationChanged(int orientation) { //printf("Orientation: %i\n", orientation); ScreenOrientation newOrientation; switch (orientation) { case 1: newOrientation = kScreenOrientationPortrait; break; case 3: newOrientation = kScreenOrientationLandscape; break; case 4: newOrientation = kScreenOrientationFlippedLandscape; break; default: return; } if (_screenOrientation != newOrientation) { _screenOrientation = newOrientation; updateOutputSurface(); dirtyFullScreen(); if (_videoContext->overlayVisible) dirtyFullOverlayScreen(); updateScreen(); } }
/* doulblebuffered flip */ void gp2x_video_flip2(void) { #if 0 if(preferences.landscape) { int x, y; unsigned short *screen_ptr = (unsigned short *)gp2x_screen; unsigned short *current_scanline_ptr = screen_ptr; unsigned short *current_target_ptr = (unsigned short *)BaseAddress; for( x = 0; x < 320; x++ ) { for( y = 0; y < 240; y++ ) { *current_target_ptr++ = current_scanline_ptr[(320 * (240-y)) + (x)]; } } } else #endif { memcpy(BaseAddress, gp2x_screen, 320*240*2); } updateScreen(); }
void handle_708_HDW_HideWindows (cc708_service_decoder *decoder, int windows_bitmap) { printf (" Entry in handle_708_HDW_HideWindows, windows: "); if (windows_bitmap==0) printf ("None\n"); else { int changes=0; for (int i=0; i<8; i++) { if (windows_bitmap & 1) { printf ("[Window %d] ",i ); if (decoder->windows[i].visible) { changes=1; decoder->windows[i].visible=0; } // TODO: Actually Hide Window } windows_bitmap>>=1; } if (changes) updateScreen (decoder); } printf ("\n"); }
void CUP_Player::play() { while (parseNextHeaderTag(_fileStream)) { } if (_fileStream.eos() || _fileStream.err()) return; debug(1, "rate %d width %d height %d", _playbackRate, _width, _height); int ticks = _system->getMillis(); while (_dataSize != 0 && !_vm->shouldQuit()) { while (parseNextBlockTag(_fileStream)) { } if (_fileStream.eos() || _fileStream.err()) return; int diff = _system->getMillis() - ticks; if (diff >= 0 && diff <= _playbackRate) { _system->delayMillis(_playbackRate - diff); } else { _system->delayMillis(1); } updateSfx(); updateScreen(); _vm->parseEvents(); ticks = _system->getMillis(); } }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); m_conf = new Config(this); m_upd = new UpdateIndex(m_conf, this); m_avr = new AVRRunner(this); m_curDevice = 0; m_curUpdate = 0; m_outputHidden = true; connect(m_upd, SIGNAL(updateComplete(bool)), this, SLOT(_updateCompleted(bool))); connect(m_avr, SIGNAL(avrOutput(QByteArray)), this, SLOT(_avrOutput(QByteArray))); connect(m_avr, SIGNAL(finished(bool)), this, SLOT(_avrDone(bool))); connect(m_avr, SIGNAL(status(AVRRunner::Status)), this, SLOT(_avrStatus(AVRRunner::Status))); UpdateDialog updateScreen(m_upd, this); updateSerialPorts(); m_upd->checkUpdates(); updateScreen.hideNoUpdate(true); updateScreen.exec(); ui->actProgress->setRange(0, 4); ui->outputText->hide(); // apply themeing setStyleSheet(SingleThemer::getStyleSheet("main")); }
bool WelcomeDialog::checkConnectionToServer(void) { m_updateStatusTimer->stop(); bool bRes = false; if (gCoreContext->IsConnectedToMaster()) bRes = true; else { if (gCoreContext->ConnectToMasterServer(false)) { bRes = true; updateAll(); } else updateScreen(); } if (bRes) m_updateStatusTimer->start(UPDATE_STATUS_INTERVAL); else m_updateStatusTimer->start(5000); return bRes; }
WelcomeDialog::WelcomeDialog(MythScreenStack *parent, const char *name) :MythScreenType(parent, name), m_status_text(NULL), m_recording_text(NULL), m_scheduled_text(NULL), m_warning_text(NULL), m_startfrontend_button(NULL), m_menuPopup(NULL), m_updateStatusTimer(new QTimer(this)), m_updateScreenTimer(new QTimer(this)), m_isRecording(false), m_hasConflicts(false), m_bWillShutdown(false), m_secondsToShutdown(-1), m_preRollSeconds(0), m_idleWaitForRecordingTime(0), m_idleTimeoutSecs(0), m_screenTunerNo(0), m_screenScheduledNo(0), m_statusListNo(0), m_frontendIsRunning(false), m_pendingRecListUpdate(false), m_pendingSchedUpdate(false) { gCoreContext->addListener(this); m_installDir = GetInstallPrefix(); m_preRollSeconds = gCoreContext->GetNumSetting("RecordPreRoll"); m_idleWaitForRecordingTime = gCoreContext->GetNumSetting("idleWaitForRecordingTime", 15); m_timeFormat = gCoreContext->GetSetting("TimeFormat", "h:mm AP"); m_dateFormat = gCoreContext->GetSetting("MythWelcomeDateFormat", "dddd\\ndd MMM yyyy"); m_dateFormat.replace("\\n", "\n"); // if idleTimeoutSecs is 0, the user disabled the auto-shutdown feature m_bWillShutdown = (gCoreContext->GetNumSetting("idleTimeoutSecs", 0) != 0); m_idleTimeoutSecs = gCoreContext->GetNumSetting("idleTimeoutSecs", 0); connect(m_updateStatusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_updateStatusTimer->start(UPDATE_STATUS_INTERVAL); connect(m_updateScreenTimer, SIGNAL(timeout()), this, SLOT(updateScreen())); }
void OSystem_IPHONE::initSize(uint width, uint height) { //printf("initSize(%i, %i)\n", width, height); _screenWidth = width; _screenHeight = height; free(_offscreen); _offscreen = (byte *)malloc(width * height); bzero(_offscreen, width * height); free(_overlayBuffer); int fullSize = _screenWidth * _screenHeight * sizeof(OverlayColor); _overlayBuffer = (OverlayColor *)malloc(fullSize); clearOverlay(); free(_fullscreen); _fullscreen = (uint16 *)malloc(fullSize); bzero(_fullscreen, fullSize); iPhone_initSurface(width, height); _fullScreenIsDirty = false; dirtyFullScreen(); _mouseVisible = false; _screenChangeCount++; updateScreen(); }
// program code aways begins at the top of main() int main(){ //The next line is a function drom core.cpp // it sets up Allegro for graphics and keyboard techInit(); gameSetup(); // this next while loop while(key[KEY_ESC] == false){ updatePaddlePosition(); moveBall(); if(numberOfBricksRemaining() == 0) { resetBricks(); } drawingThings(); // this line draws the screenBuffer to the screen // by drawing to off-screen memory first, then // copying the new total image to screen all at once, // we can avoid any flickering/flashing from the player // seeing characters drawn sequentially. // The technique us called double buffering. updateScreen(); // is the game going too fast on your awesome modern hardware? // Experiment with numbers 0-15 here to slow down the application: rest(1); } return 0; } END_OF_MAIN()// putting this line after the main() function
int SFLPhone::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = KXmlGuiWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_view_statusMessageChangeAsked((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 1: on_view_windowTitleChangeAsked((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 2: on_view_enabledActionsChangeAsked((*reinterpret_cast< const bool*(*)>(_a[1]))); break; case 3: on_view_actionIconsChangeAsked((*reinterpret_cast< const QString*(*)>(_a[1]))); break; case 4: on_view_actionTextsChangeAsked((*reinterpret_cast< const QString*(*)>(_a[1]))); break; case 5: on_view_transferCheckStateChangeAsked((*reinterpret_cast< bool(*)>(_a[1]))); break; case 6: on_view_recordCheckStateChangeAsked((*reinterpret_cast< bool(*)>(_a[1]))); break; case 7: on_view_addressBookEnableAsked((*reinterpret_cast< bool(*)>(_a[1]))); break; case 8: on_view_screenChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 9: on_view_incomingCall((*reinterpret_cast< const Call*(*)>(_a[1]))); break; case 10: updateScreen((*reinterpret_cast< QAction*(*)>(_a[1]))); break; case 11: quitButton(); break; default: ; } _id -= 12; } return _id; }
/** * Funzione che forka il programma e gli fa eseguire il comando di terminale "tput" con parametro "cols", * che ritorna la larghezza del terminale sul quale è usato. * Utilizzata per rendere l'interfaccia ridimensionabile in caso di resize del terminale */ void calcolaLarghezzaSchermo(int arg) { int pid, status; char buff [20]; int fd[2]; char* commands[] = {"tput", "cols", NULL}; /*Creo PIPE per leggere l'output di tput*/ pipe(fd); pid = fork(); if (pid == 0) { /*Sposto l'output di tput perché scriva sulla PIPE*/ dup2(fd[1], 1); close(fd[0]); /*Invoco tput con i parametri specificati*/ execvp("tput", commands); } else { /*Attende che tput termini*/ wait(&status); /*Leggo dalla PIPE il valore tornato da tput*/ read(fd[0], buff, 20); larghezzaSchermo = strtol(buff, NULL, 10); } updateScreen(); /*Mi imposto come signal handler nel caso il terinale cambi di nuovo dimensione*/ signal(SIGWINCH, calcolaLarghezzaSchermo); }
int main(void) { //Library initialization initBjDevLib(); //third-party LCD library initialization //third-party LCD library initialization LCDInit(LS_ULINE); LcdHideCursor(); //register pedal change position callback //you can use callback, which will invoke only then pedals was turn or check pedal position manually, //compare it with previous value and process changes expRegisterPedalChangePositionCallback(expPedalsCallback); LCDWriteStringXY(0, 0,"Pedal 1 : "); LCDWriteStringXY(0, 1,"Pedal 2 : "); //manual read current pedal position pedalPositions[0] = expGetPedalPosition(EXP_PEDAL1); pedalPositions[1] = expGetPedalPosition(EXP_PEDAL2); //print current pedal positions updateScreen(); while(1) { //continuously reading all pedals and run callback, if any changes detected expProcess(); } }
void GameView::run() { float frameCounter = 0, frameSpeed = 500; Clock clock; bool updateFrame = true; while(_screen.isOpen()) { EventManager eventManager; sf::Event event; while (_screen.pollEvent(event)) { eventManager.processEvent(event); } updateScreen(eventManager); if(updateFrame) frameCounter += frameSpeed*clock.restart().asSeconds(); else frameCounter = 0; frameCounter += frameSpeed*clock.restart().asSeconds(); renderScreen(); } }
bool WelcomeDialog::updateScheduledList() { { // clear pending flag early in case something happens while // we're updating QMutexLocker lock(&m_SchedUpdateMuxtex); setPendingSchedUpdate(false); } m_scheduledList.clear(); m_screenScheduledNo = 0; if (!gCoreContext->IsConnectedToMaster()) { updateStatusMessage(); return false; } GetNextRecordingList(m_nextRecordingStart, &m_hasConflicts, &m_scheduledList); updateStatus(); updateScreen(); return true; }
void OSystem_Android::clearScreen(FixupType type, byte count) { assert(count > 0); bool sm = _show_mouse; _show_mouse = false; GLCALL(glDisable(GL_SCISSOR_TEST)); for (byte i = 0; i < count; ++i) { // clear screen GLCALL(glClearColorx(0, 0, 0, 1 << 16)); GLCALL(glClear(GL_COLOR_BUFFER_BIT)); switch (type) { case kClear: break; case kClearSwap: JNI::swapBuffers(); break; case kClearUpdate: _force_redraw = true; updateScreen(); break; } } if (!_show_overlay) GLCALL(glEnable(GL_SCISSOR_TEST)); _show_mouse = sm; _force_redraw = true; }
void WelcomeDialog::runEPGGrabber(void) { runMythFillDatabase(); sleep(1); updateStatusMessage(); updateScreen(); }
/* * updateline() - like updateScreen() but only for cursor line * * This determines whether or not we need to call updateScreen() to examine * the entire screen for changes. This occurs if the size of the cursor line * (in rows) hasn't changed. */ void updateline() { int row; int n; screenalloc(); /* allocate screen buffers if size changed */ if (Nextscreen == NULL || RedrawingDisabled) return; screenchar(NULL, 0, 0); /* init cursor position of screenchar() */ outstr(T_CI); /* disable cursor */ row = screenline(Curpos.lnum, Cline_row, (int)Rows - 1); outstr(T_CV); /* enable cursor again */ n = row - Cline_row; if (n != Cline_size) /* line changed size */ { if (n < Cline_size) /* got smaller: delete lines */ s_del(row, Cline_size - n, FALSE); else /* got bigger: insert lines */ s_ins(Cline_row + Cline_size, n - Cline_size, FALSE); updateScreen(VALID_TO_CURSCHAR); } }
void process_cr (cc708_service_decoder *decoder) { switch (decoder->windows[decoder->current_window].attribs.print_dir) { case pd_left_to_right: decoder->windows[decoder->current_window].pen_column=0; if (decoder->windows[decoder->current_window].pen_row+1 < decoder->windows[decoder->current_window].row_count) decoder->windows[decoder->current_window].pen_row++; break; case pd_right_to_left: decoder->windows[decoder->current_window].pen_column=decoder->windows[decoder->current_window].col_count; if (decoder->windows[decoder->current_window].pen_row+1 < decoder->windows[decoder->current_window].row_count) decoder->windows[decoder->current_window].pen_row++; break; case pd_top_to_bottom: decoder->windows[decoder->current_window].pen_row=0; if (decoder->windows[decoder->current_window].pen_column+1 < decoder->windows[decoder->current_window].col_count) decoder->windows[decoder->current_window].pen_column++; break; case pd_bottom_to_top: decoder->windows[decoder->current_window].pen_row=decoder->windows[decoder->current_window].row_count; if (decoder->windows[decoder->current_window].pen_column+1 < decoder->windows[decoder->current_window].col_count) decoder->windows[decoder->current_window].pen_column++; break; } if (decoder->windows[decoder->current_window].anchor_point == anchorpoint_bottom_left || decoder->windows[decoder->current_window].anchor_point == anchorpoint_bottom_center) { rollupWindow(decoder, decoder->current_window); updateScreen(decoder); } }
void GfxTransitions::updateScreenAndWait(uint32 shouldBeAtMsec) { updateScreen(); // if we have still some time left, delay accordingly uint32 msecPos = g_system->getMillis() - _transitionStartTime; if (shouldBeAtMsec > msecPos) g_system->delayMillis(shouldBeAtMsec - msecPos); }
// seg001:1029 int __pascal far fade_in_1() { #ifdef USE_FADE // sbyte index; word interrupted; if (graphics_mode == gmMcgaVga) { fade_palette_buffer = make_pal_buffer_fadein(offscreen_surface, 0x6689, /*0*/ 2); is_global_fading = 1; do { interrupted = proc_cutscene_frame(1); if (interrupted == 1) { return 1; } } while (interrupted == 0); is_global_fading = 0; } else { // ... } return 0; #else // stub method_1_blit_rect(onscreen_surface_, offscreen_surface, &screen_rect, &screen_rect, 0); updateScreen(); // SDL_UpdateRect(onscreen_surface_, 0, 0, 0, 0); // debug return 0; #endif }
void WelcomeDialog::unlockShutdown(void) { QString mythshutdown_exe = m_installDir + "/bin/mythshutdown --unlock"; myth_system(mythshutdown_exe); updateStatusMessage(); updateScreen(); }
bool DrasculaEngine::pickupObject() { int obj = pickedObject; checkFlags = 1; updateRoom(); showMenu(); updateScreen(); // Objects with an ID smaller than 7 are the inventory verbs if (pickedObject >= 7) { int n = whichObject(); if (n != 0 && inventoryObjects[n] == 0) { inventoryObjects[n] = obj; takeObject = 0; checkFlags = 0; } } if (checkFlags == 1) { if (checkMenuFlags()) return true; } updateEvents(); if (takeObject == 0) selectVerb(kVerbNone); return false; }
void handle_708_DSW_DisplayWindows (cc708_service_decoder *decoder, int windows_bitmap) { printf (" Entry in handle_708_DSW_DisplayWindows, windows: "); if (windows_bitmap==0) printf ("None\n"); else { int changes=0; for (int i=0; i<8; i++) { if (windows_bitmap & 1) { printf ("[Window %d] ",i ); if (!decoder->windows[i].visible) { changes=1; decoder->windows[i].visible=1; } } windows_bitmap>>=1; } printf ("\n"); if (changes) updateScreen (decoder); } }