void World::draw() { switch(state) { case ST_GAMEPLAY: render.draw(*this); drawAction(); if(tutorial) tutorial->draw(); // if(currentRace) // render.drawCurrentRace(currentRace->getColor()); break; case ST_DEFEAT: render.makeScreenshot(*this); main->setCurrent(CID_LEVEL_FAILED, false); selectedLevel = currentLevel; break; case ST_WIN: render.makeScreenshot(*this); if(currentLevel < MAX_LEVELS) { main->setCurrent(CID_LEVEL_COMPLETED, false); selectedLevel = currentLevel + 1; } else main->setCurrent(CID_GAME_OVER, false); break; case ST_PAUSE: render.makeScreenshot(*this); main->setCurrent(CID_PAUSE, false); break; } }
void OfxOverlayInteract::drawOverlay(TimeValue time, const RenderScale & renderScale, ViewIdx view) { EffectInstancePtr effect = getEffect(); EffectInstanceTLSDataPtr tls = effect->getOrCreateTLSObject(); EffectActionArgsSetter_RAII actionArgsTls(tls, kOfxInteractActionDraw, time, view, renderScale #ifdef DEBUG , /*canSetValue*/ true , /*canBeCalledRecursively*/ false #endif ); ThreadIsActionCaller_RAII actionCaller(toOfxEffectInstance(effect)); OfxRGBAColourD pickerColor; bool hasPicker = hasColorPicker(); if (hasPicker) { pickerColor = colorToOfxColor(getLastColorPickerColor()); } drawAction(time, renderScale, view, hasPicker ? &pickerColor : /*colourPicker=*/0); }
void structButtonEditor :: v_draw () { Graphics_clearWs (our graphics.get()); switch (show) { case 1: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { Praat_Command cmd = praat_getMenuCommand (i); if (str32equ (cmd -> window, U"Objects")) drawMenuCommand (this, praat_getMenuCommand (i), i); } break; case 2: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { Praat_Command cmd = praat_getMenuCommand (i); if (str32equ (cmd -> window, U"Picture")) drawMenuCommand (this, praat_getMenuCommand (i), i); } break; case 3: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { Praat_Command cmd = praat_getMenuCommand (i); if (! str32equ (cmd -> window, U"Objects") && ! str32equ (cmd -> window, U"Picture")) drawMenuCommand (this, praat_getMenuCommand (i), i); } break; case 4: for (long i = 1, n = praat_getNumberOfActions (); i <= n; i ++) { Praat_Command cmd = praat_getAction (i); const char32 *klas = cmd -> class1 -> className; if (str32cmp (klas, U"N") < 0) drawAction (this, praat_getAction (i), i); } break; case 5: for (long i = 1, n = praat_getNumberOfActions (); i <= n; i ++) { Praat_Command cmd = praat_getAction (i); const char32 *klas = cmd -> class1 -> className; if (str32cmp (klas, U"N") >= 0) drawAction (this, praat_getAction (i), i); } break; } }
void ButtonEditor::draw () { Graphics_clearWs (_g); switch (_show) { case 1: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { praat_Command cmd = praat_getMenuCommand (i); if (wcsequ (cmd -> window, L"Objects")) drawMenuCommand (praat_getMenuCommand (i), i); } break; case 2: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { praat_Command cmd = praat_getMenuCommand (i); if (wcsequ (cmd -> window, L"Picture")) drawMenuCommand (praat_getMenuCommand (i), i); } break; case 3: for (long i = 1, n = praat_getNumberOfMenuCommands (); i <= n; i ++) { praat_Command cmd = praat_getMenuCommand (i); if (! wcsequ (cmd -> window, L"Objects") && ! wcsequ (cmd -> window, L"Picture")) drawMenuCommand (praat_getMenuCommand (i), i); } break; case 4: for (long i = 1, n = praat_getNumberOfActions (); i <= n; i ++) { praat_Command cmd = praat_getAction (i); const wchar_t *klas = ((Data_Table) cmd -> class1) -> _className; if (wcscmp (klas, L"N") < 0) drawAction (praat_getAction (i), i); } break; case 5: for (long i = 1, n = praat_getNumberOfActions (); i <= n; i ++) { praat_Command cmd = praat_getAction (i); const wchar_t *klas = ((Data_Table) cmd -> class1) -> _className; if (wcscmp (klas, L"N") >= 0) drawAction (praat_getAction (i), i); } break; } }
void CharacterBase::drawChara(const Vec2f & pos_, const Texture & tex_) { drawAction(pos_, chara.current_action, chara.current_frame, tex_); }