CList<Operation, Operation> * Algorithm::GetOperations(void) { if (m_OperationList.IsEmpty()) ComputeNextStep(); return &m_OperationList; }
int main(){ SetUserPostVsyncCallback(&VsyncCallBack); while(1){ vmode=0; vmode_text_lines=SCREEN_TILES_V; paused=true; u8 option=0; do{ option=Title(); if(option==1){ DisplayHowToPlay(); } }while(option!=0); ClearVram(); SetTileTable(font); SetFontTilesIndex(0); CreateStatusBar(); //SetTile(0,0,91); //SetTile(1,0,92); //Print(1,0,PSTR("Started Generation: SELECT=Menu")); vmode_text_lines=1; //vmode=1; vmode_grid_col=9;//82; vmode_page=0; cursor_x=44; cursor_y=25; //R-pentamino //PutPixel(40,30,1,0); //PutPixel(41,30,1,0); //PutPixel(39,31,1,0); //PutPixel(40,31,1,0); //PutPixel(40,32,1,0); //u16 joy; inMainLoop=true; bool gameEnd=false; while(1){ WaitVsync(1); if(!paused){ ComputeNextStep(); vmode_page^=1; gen++; } if(keyAction!=ACTION_NONE){ switch(keyAction){ case ACTION_STARTSTOP: paused=!paused; keyAction=ACTION_NONE; break; case ACTION_OPENMENU: if(OpenMenu()==1){ gameEnd=true; inMainLoop=false; } keyAction=ACTION_NONE; break; } } UpdateStatusBar(); if(gameEnd)break; } } }