/***************************************************************** 関数名 : TimerEvent 機能 : メインでのタイマーイベント 引数 : time : 25fpsなのでif(time%25==0)->で1秒毎に何かしてくれるらしい 出力 : なし *****************************************************************/ void TimerEvent(int time) { /* time%5->0.2秒毎, time%25->1秒毎くらい */ if(mState == MAIN_MOVE) { UseCommand(); } DrawMain(); }
void IMovable::processImage(DrawType type) { if (NODRAW) return; if (!GetSprite() || GetSprite()->Fail() || !GetMetadata()) return; if (GetMetadata()->dirs >= 4) { DrawMain(helpers::dir_to_byond(dMove), GetDrawX() + mob_position::get_shift_x(), GetDrawY() + mob_position::get_shift_y()); } else { DrawMain(0, GetDrawX() + mob_position::get_shift_x(), GetDrawY() + mob_position::get_shift_y()); } }
void CContainer3::DrawRequiredControls() const { DrawMain(Rect()); DrawButton(); }
//================================================ //メインループ //================================================ void Luna::Main(long ArgNum, char *pArgStr[]) { //---------------------------------------- //全システムの開始 //---------------------------------------- if(Luna::Start() ) { //-------------------------------- //初期化処理 //-------------------------------- InitProcess(); //LunaInput::GetMouseData(&camera.Mouse); //LunaInput::GetMouseData(&camera.MouseOld); //-------------------------------- //ゲーム用ループ //-------------------------------- while(Luna::WaitForMsgLoop() ) { /*画面クリア*/ Luna3D::Clear(D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, COLOR_BLACK, 1.0f); //Luna3D::Clear(D3DCLEAR_TARGET, COLOR_WHITE); /*デバッグ画面クリア*/ // LunaDebug::Clear(); switch(g_GameMode) { case SCENE_INITIALIZE: { Initialize(); break; } case SCENE_LOGO: { //DrawLogo(); break; } case SCENE_TITLE: { DrawTitle(); break; } case SCENE_CHARSEL: { DrawCharaSelect(); break; } case SCENE_MAIN: { DrawMain(); break; } case SCENE_OPTION: { DrawOption(); break; } case SCENE_TUTOLIAL: { DrawTutorial(); break; } case SCENE_PAUSE: { DrawPause(); break; } case SCENE_PAUSEEXIT: { DrawPauseExit(); break; } case SCENE_ERROR: { DrawError(); break; } case SCENE_EXIT: { DrawExit(); break; } case SCENE_FADEIN: { Fadein(); break; } case SCENE_FADEOUT: { Fadeout(); break; } case SCENE_CONV: { Conversation(); break; } case SCENE_GAMECLEAR: { DrawGameClear(); break; } case SCENE_GAMEOVER: { DrawGameOver(); break; } case SCENE_CONTINUE: { DrawContinue(); break; } case SCENE_FINALIZE: { Finalize(); break; } } /*画面更新*/ Luna3D::Refresh(); /*デバッグ処理*/ // Debug(); } /*終了処理*/ Finalize(); } }