void AnimationExportWidget::recordAnimationFrameSeq() { recordAnimation(false); }
void AnimationExportWidget::recordAnimationVideo() { recordAnimation(true); }
void main() { uchar c, c1; uchar selAnimationT = 0; uint selAnimationTT = 0, keybTimeout=0; intro(); // Инициализируем экран initGameScreen(); // Запускаем игру startGame(); while(1) { rand(); if(selX!=-1) { selAnimationTT++; if(selAnimationTT==500) { selAnimationTT=0; drawSpriteSel(selX, selY, game[selX][selY], selX==cursorX && selY==cursorY, selAnimationT); selAnimationT++; if(selAnimationT>=4) selAnimationT=0; else if(playSound && selAnimationT==2) soundJumpSel(); } } c1 = bioskey_(); if(keybTimeout) { keybTimeout--; continue; } if(c == c1) continue; c = c1; switch(c) { case KEY_PATH: showPath = !showPath; drawOnOff(0, showPath); break; case KEY_SOUND: playSound = !playSound; drawOnOff(1, playSound); break; case KEY_HELP: showHelp = !showHelp; drawOnOff(2, showHelp); redrawNewBalls2(); break; case KEY_RECORD: prepareRecordScreen(); drawRecordScreen(-1); getch_(); drawCells(); break; case KEY_NEW: startGame(); break; /* case KEY_UP: if(score>=10) score-=10; drawScore1(); break; case KEY_DOWN: score+=10; drawScore1(); break; */ case KEY_UP: clearCursor(); if(cursorY==0) cursorY=8; else cursorY--; drawCursor(); break; case KEY_DOWN: clearCursor(); if(cursorY==8) cursorY=0; else cursorY++; drawCursor(); break; case KEY_LEFT: clearCursor(); if(cursorX==0) cursorX=8; else cursorX--; drawCursor(); break; case KEY_RIGHT: clearCursor(); if(cursorX==8) cursorX=0; else cursorX++; drawCursor(); break; case KEY_SPACE: if(game[cursorX][cursorY]) { if(selX!=-1) drawCell(selX, selY); selX=cursorX, selY=cursorY; break; } if(selX==-1) break; move(); if(gameOver) { recordAnimation(); startGame(); } break; default: continue; } keybTimeout=300; } }