void CStar::Draw(Vector _mypos, int _timecount){ if (!Visible)return; _timecount += TimeGap; DrawPos = DrawPosition(Pos, _mypos); if(DrawPos.x<-Radius*2-50 || DrawPos.x>WINDOW_WIDTH+Radius*2+50) return; if(DrawPos.y<-Radius*2-50 || DrawPos.y>WINDOW_HEIGHT+Radius*2+50)return; if(Alive){ //Star DrawRotaGraph((int)(DrawPos.x), (int)(DrawPos.y), 1, (_timecount%300)*PI/150, ImgStar, true) ; //Enemy生成タイムゲージ for(int i=0; i<3; i++){ DrawExtendGraph((int)DrawPos.x-12, (int)DrawPos.y-3+8*(i-1), (int)DrawPos.x+12, (int)DrawPos.y+3+8*(i-1), ImgStarGauge[0], true); DrawExtendGraph((int)DrawPos.x-11, (int)DrawPos.y-2+8*(i-1), (int)(DrawPos.x-11 + 22 * (1+(_timecount%EnemyBirthTime[i])) / EnemyBirthTime[i]), (int)DrawPos.y+2+8*(i-1), ImgStarGauge[1], true); } }else{ //ティウンティウン] for (int i=0; i<8; i++){ if(_timecount/5 % 2 == 0) DrawCircle((int)(DeadCircleDrawPos[i].x+DrawPos.x), (int)(DeadCircleDrawPos[i].y+DrawPos.y), 12, GetColor(255,100,0), false); } } }
void MapDraw(int* MapObjGraph) { for (int i = 0; i < MAP_HEIGHT; ++i) { for (int j = 0; j < MAP_WIDTH; ++j) { if (MapDatas[i][j] == 0) { DrawExtendGraph(j * MAP_WIDTH, i * MAP_HEIGHT, j * MAP_WIDTH + MAP_WIDTH, i * MAP_HEIGHT + MAP_HEIGHT, MapObjGraph[0], true); } if (MapDatas[i][j] == 1) { DrawExtendGraph(j * MAP_WIDTH, i * MAP_HEIGHT, j * MAP_WIDTH + MAP_WIDTH, i * MAP_HEIGHT + MAP_HEIGHT, MapObjGraph[1], true); } } } }
void TreasureEffect::Draw(void) { int l_ItemNum = DataManager::GetInstance().m_MogllStatus.treasureStatus; DataManager &data = DataManager::GetInstance(); if( data.m_MogllStatus.treasureStatus != -1 ) { DrawGraph( (int)(800 * m_BackPosition.x), (int)(600 * m_BackPosition.y), data.Get( DataManager::Play_GetTreasure_BG ), TRUE); } if(m_Status == TREASURE_STATUS_WAIT || m_Status == TREASURE_STATUS_ITEMIN || m_Status == TREASURE_STATUS_OUT){ m_GetTreasure.Draw(); } DrawItem(); if(m_Status >= TREASURE_STATUS_ITEMFRAMEIN && m_Status < TREASURE_STATUS_ALLOUT){ SetDrawBlendMode(DX_BLENDMODE_ALPHA, m_FrameAlpha); if(l_ItemNum < 60 && l_ItemNum > -1){ DrawExtendGraph(static_cast<int>(m_FramePosX)-50,static_cast<int>(m_FramePosY)+150-50, 770,static_cast<int>(m_FramePosY)+150+250, data.Get(DataManager::Icon_Description_Frame),TRUE); m_FontManager.DrawFontString( FontManager::FontSet_AZUKI_W005, static_cast<int>(m_FramePosX),static_cast<int>(m_FramePosY)+150, m_Message,700,GetColor(0,0,0)); } else if(l_ItemNum >= 60){ DrawExtendGraph(static_cast<int>(m_FramePosX)-60,static_cast<int>(m_FramePosY+100)+150-100, 770,static_cast<int>(m_FramePosY+180)+150-100, data.Get(DataManager::Icon_Description_Frame),TRUE); m_FontManager.DrawFontString( FontManager::FontSet_AZUKI_W004375, static_cast<int>(m_FramePosX),static_cast<int>(m_FramePosY+100)+170-100, m_Message,700,GetColor(0,0,0)); } SetDrawBlendMode(DX_BLENDMODE_ALPHA, 255); } if(m_Status >= TREASURE_STATUS_ITEMDESCRIPTION && m_Status < TREASURE_STATUS_ALLOUT){ SetDrawBlendMode(DX_BLENDMODE_ALPHA, m_DesAlpha); if(l_ItemNum < 60 && l_ItemNum > -1){ m_FontManager.DrawFontString( FontManager::FontSet_AZUKI_W00375, static_cast<int>(m_DesPosX),static_cast<int>(m_DesPosY), DataManager::GetInstance().m_SystemData.equip[l_ItemNum].text,600,GetColor(0,0,0)); } SetDrawBlendMode(DX_BLENDMODE_ALPHA, 255); } }
void Item::Draw(int DrawPointX, int DrawPointY, int MapScrollX, int MapScrollY) { DrawExtendGraph(StartX + (X - DrawPointX) * ChipSize + MapScrollX, StartY + (Y - DrawPointY) * ChipSize + MapScrollY, StartX + (X - DrawPointX) * ChipSize + ChipSize + MapScrollX, StartY + (Y - DrawPointY) * ChipSize + ChipSize + MapScrollY, (*dataBase->dungeonItemGraph)(((dataBase->itemData.at(No).Type) < 100) ? (dataBase->itemData.at(No).Type) : (dataBase->itemData.at(No).Type) / 100 + 1), TRUE); }
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int){ SetWindowText("Title"); SetGraphMode(WINDOW_WIDTH , WINDOW_HEIGHT,32 ); ChangeWindowMode(TRUE), DxLib_Init(), SetDrawScreen( DX_SCREEN_BACK ); int LoadImage = LoadGraph("Natsuiro/BLOCK/load.png"); DrawExtendGraph(0,0,WINDOW_WIDTH,WINDOW_HEIGHT, LoadImage ,false); ScreenFlip(); SetTransColor(255,0,255); Awake(); long long TIME = GetNowHiPerformanceCount(); # if BENCHMARK == TRUE long long int count = GetNowCount(); # endif while( ScreenFlip()==0 && ProcessMessage()==0 && ClearDrawScreen()==0 && !CheckHitKey(KEY_INPUT_ESCAPE) ){ GameLoop(); Sleep( (unsigned long)max( 16 - (int)( GetNowHiPerformanceCount() - TIME ) / 1000 , 0 ) ); TIME = GetNowHiPerformanceCount(); # if BENCHMARK == TRUE DrawFormatString(WINDOW_WIDTH-200,0,BLACK,"FPS %d (%dms)", (int)( 1000/( GetNowCount() - count ) ) , GetNowCount() - count ); count = GetNowCount(); # endif } DxLib_End(); return 0; }
void RawSprite::Render() { if (m_graphic == -1) { assert(!"m_graphic is null"); } DrawExtendGraph(m_position.x, m_position.y, m_position.x + m_size.x , m_position.y + m_size.y, m_graphic,FALSE); }
//--------------------------------------------------------------------- void SaveloadDraw::drawSavedataThumbnail(int savedata_pos) { int num = savedata_pos + saveload_state->getPage() * SaveloadData::getSavedataNum(); int px = SaveloadData::getSavedataPosX(savedata_pos) + 7; int py = SaveloadData::getSavedataPosY(savedata_pos) + 7; if (!SaveData::getInstance()->isData(num)) { DrawGraph(px, py, image_thumbnail_nodata, TRUE); return; } int scenario_num = SaveData::getInstance()->getScenarioPos(num); SetDrawMode(DX_DRAWMODE_BILINEAR); // background int back_image = AllScenarioData::getInstance()->getBackimage(scenario_num); DrawExtendGraph( px, py, px + 177, py + 100, ImageData::getInstance()->getImageBack(back_image), TRUE); // character for (int n = 1; n <= AllScenarioData::getInstance()->getCharaNum(scenario_num); n++) { int chara_image = AllScenarioData::getInstance()->getCharaImage(scenario_num, n); int chara_pos = AllScenarioData::getInstance()->getCharaPos(scenario_num, n); int image_handl = ImageData::getInstance()->getImageChara(chara_image); switch (chara_pos) { case 1: DrawExtendGraph(px + 34, py + -14, px + 146, py + 217, image_handl, TRUE); break; case 2: DrawExtendGraph(px + 55, py + 14, px + 125, py + 154, image_handl, TRUE); break; case 3: DrawExtendGraph(px + 13, py + 14, px + 83, py + 154, image_handl, TRUE); break; case 4: DrawExtendGraph(px + 97, py + 14, px + 167, py + 154, image_handl, TRUE); break; case 5: DrawExtendGraph(px + 69, py + 28, px + 117, py + 112, image_handl, TRUE); break; case 6: DrawExtendGraph(px + 13, py + 28, px + 55, py + 112, image_handl, TRUE); break; case 7: DrawExtendGraph(px + 125, py + 28, px + 167, py + 112, image_handl, TRUE); break; case 8: DrawExtendGraph(px + 41, py + 28, px + 83, py + 112, image_handl, TRUE); break; case 9: DrawExtendGraph(px + 97, py + 28, px + 139, py + 112, image_handl, TRUE); break; } } SetDrawMode(DX_DRAWMODE_NEAREST); }
void draw(Graph graph[15]){ static int i; for (i = 0; i < 15; i++){ DrawExtendGraph(graph[i].x, graph[i].y, graph[i].x + graph[i].width, graph[i].y + graph[i].height, graph[i].handle, TRUE); } DrawFormatString(20, 450, 0xff0000, "クリックで拡大。'x'でタイトルに戻る"); mouse(graph); }
void NavigationAI::Render(const int xx, const int yy,const int value){ const int x = xx * m_size; const int y = yy * m_size; const int width = (xx + 1) * m_size; const int height = (yy + 1)* m_size; DrawExtendGraph(x, y, width, height, m_imageArray[value], FALSE); }
void Player::Draw(int color){ for (int i = 0; i < EFFECT_MAX; i++){ effect[i].Draw(); effect[i].Move(); } //プレイヤーキャラの表示 if (alive == TRUE){ SetDrawBlendMode(DX_BLENDMODE_ALPHA, 180); DrawBox(x - PLAYER_SIZE / 2, y - PLAYER_SIZE / 2, x + PLAYER_SIZE / 2, y + PLAYER_SIZE / 2, color, 1); SetDrawBlendMode(DX_BLENDMODE_ALPHA, 255); } if (itemstate != 0){ //DrawGraph(score_x + 80, score_y, Bomb::ghandle[4+(itemstate-1)], TRUE); DrawExtendGraph(score_x + 80, score_y, score_x + 80 + 16, score_y + 16, Bomb::ghandle[3+(itemstate)], TRUE); } if (bakudanstate != 0){ //DrawGraph(score_x + 80, score_y, Bomb::ghandle[4+(itemstate-1)], TRUE); DrawExtendGraph(score_x + 100, score_y, score_x + 100 + 16, score_y + 16, Bomb::ghandle[6], TRUE); } }
int BmsPlayer::casc_DrawGraph(int channel, int index){ if (graph_handle.size() < channel_array.at(channel).at(index).first && 0 < channel_array.at(channel).at(index).first) return 0; if (!(before_graph_index == index)) PlayMovieToGraph(graph_handle.at(channel_array.at(channel).at(index).first)); DrawExtendGraph(560, 100, 1060, 600,graph_handle.at(channel_array.at(channel).at(index).first), FALSE); before_graph_index = index; return 0; }
void CEnemy::Draw(Vector _mypos){ if(Alive){ Vector DrawPos = DrawPosition(Pos, _mypos); if(DrawPos.x<-PicSizeX || DrawPos.x>WINDOW_WIDTH+PicSizeX) return; if(DrawPos.y<-PicSizeY || DrawPos.y>WINDOW_HEIGHT+PicSizeY)return; //敵絵 DrawRotaGraph((int)(DrawPos.x), (int)(DrawPos.y), 1, -GetAngle(_mypos), ImgEnemy[0], true); DrawRotaGraph((int)(DrawPos.x), (int)(DrawPos.y), 1, -GetAngle(_mypos), ImgEnemy[1], true); //HPゲージ DrawExtendGraph((int)(DrawPos.x-Hp/2), (int)DrawPos.y+PicSizeY/2+5, (int)(DrawPos.x+Hp/2), (int)DrawPos.y+PicSizeY/2+4, ImgEnemy[2], true); } }
void graph_scaling(Graph graph,int scaleFlg){ static int x; static int y; static int width; static int height; static int flg=0; //初期化 if (flg == 0){ x = graph.x; y = graph.y; width = graph.width; height = graph.height; flg = 1; } if (scaleFlg == 1){ /* 徐々に大きくする if (10 < x){ x-=3; } if (width + x < SCREEN_WIDTH){ width+=6; } if (9 < y){ y-=2; } if (height + y < SCREEN_HEIGHT){ height+=4; } */ x = 0; y = 0; width = SCREEN_WIDTH; height = SCREEN_HEIGHT; DrawExtendGraph(x, y, x+width, y+height, graph.handle, TRUE); }else{ DrawExtendGraph(graph.x, graph.y, graph.x + graph.width, graph.y + graph.height, graph.handle, TRUE); flg = 0; } }
/// <summary> 画像を 3D で扱えるように修正します </summary> Texture &use3D(bool alpha = true) { uint32 width = getSize().width, height = getSize().height; uint32 size = std::max(width, height); // そのままでもいい場合 if (width == height && size >= 8 && (size - 1 & size)) { return *this; } int count = 3; while (true) { uint32 _ = static_cast<uint32>(std::pow(2, count++)); if (_ >= size) { size = _ < 8 ? 8 : _; break; } } dxlib_handle screen = MakeScreen(size, size, alpha); SetDrawScreen(screen); DrawExtendGraph(0, 0, size, size, handle, alpha); DeleteGraph(handle); return *this = Texture(screen); }
void resize(const uint32 width, const uint32 height) { dxlib_handle screen = MakeScreen(width, height, true); auto _ = GetDrawScreen(); SetDrawScreen(screen); DrawExtendGraph(0, 0, width, height, handle, true); SetDrawScreen(_); DeleteGraph(handle); handle = screen; }
void suken::CScene::ButtonLoop() { std::vector<CButton>::iterator it = buttonChild.begin(); if( buttonChild.size() != 0 ){ while( it != buttonChild.end() ) { if(it->IsUseGraph){ if(it->IsReact){ if(Event.LMouse.GetOn((it->x1) , (it->y1) , (it->x2) , (it->y2))){ DrawExtendGraph( (it->x1) , (it->y1) , (it->x2) , (it->y2) , (it->graphHandle_on) , true ); }else{ DrawExtendGraph( (it->x1) , (it->y1) , (it->x2) , (it->y2) , (it->graphHandle_off) , true ); } }else{ DrawExtendGraph( (it->x1) , (it->y1) , (it->x2) , (it->y2) , (it->graphHandle) , true ); } }else{ DxLib::DrawBox(it->x1,it->y1,it->x2,it->y2,it->backColor,TRUE); suken::DrawCenterString((it->x1+it->x2)/2,(it->y1+it->y2)/2-10,it->stringColor,it->title.c_str()); } it++; } } std::vector<CpButton>::iterator it1 = pButtonChild.begin(); if( pButtonChild.size() != 0 ){ while( it1 != pButtonChild.end() ) { if(it1->IsUseGraph){ if(it1->IsReact){ if(Event.LMouse.GetOn(*(it1->x1) , *(it1->y1) , *(it1->x2) , *(it1->y2))){ DrawExtendGraph( *(it1->x1) , *(it1->y1) , *(it1->x2) , *(it1->y2) , (it1->graphHandle_on) , true ); }else{ DrawExtendGraph( *(it1->x1) , *(it1->y1) , *(it1->x2) , *(it1->y2) , (it1->graphHandle_off) , true ); } }else{ DrawExtendGraph( *(it1->x1) , *(it1->y1) , *(it1->x2) , *(it1->y2) , (it1->graphHandle) , true ); } }else{ DxLib::DrawBox( *(it1->x1) , *(it1->y1) , *(it1->x2) , *(it1->y2) , it1->backColor , TRUE ); suken::DrawCenterString( (*(it1->x1) + *(it1->x2) ) / 2 , ( *(it1->y1) + *(it1->y2) ) / 2 - 10 , it1->stringColor , it1->title.c_str() ); } it1++; } } }
void Scene_TestDangeon::DrawComment() const{ float dt = 20*sin(2.0*M_PI*(sceneTime-90)/720); TCHAR buf[3][TESTDANGEON_COMMENT_LENGTH]; for(int n=0; n<3; n++){ strcpy_s(buf[n], TESTDANGEON_COMMENT_LENGTH-1, _T("")); } // 現在クリアしたステージ数を記録 // (チュートリアルは除く) int cntStage = 0; for(int i=0; i<NUM_TESTDANGEON_STAGE1; i++){ if(g_trialAliceFile.data.dangeonStage[3+i-1]){ cntStage = i; } } // 進行度と時間の関係 int rank = 0; int rankTime[NUM_TESTDANGEON_STAGE1-1][3] = { {12, 16, 21}, {16, 23, 30}, {22, 30, 40}, {30, 45, 56}, {42, 55, 72}, }; // コメント TCHAR rankComment[4][3][TESTDANGEON_COMMENT_LENGTH] = { {_T("素晴らしいペース!"), _T("この調子で人形を成長させて、"), _T("どんどん先に進みましょう!"), }, {_T("なかなかいい感じのペース!"), _T("合成をうまく使って、"), _T("頼りになる人形を作りましょう!")}, {_T("頑張って!"), _T("うまくTPやMPを節約して、"), _T("効率よく先に進みましょう!")}, {_T("う〜ん、ちょっと遅いかも…"), _T("合成やアイテム、アリスのスキルを"), _T("うまく使って、ボスを倒すのよ!"), }, }; TCHAR rankCommentFinal[4][3][TESTDANGEON_COMMENT_LENGTH] = { {_T("あなたは一流のドールマスター!"), _T("素晴らしい人形さばきだったわ。"), _T("…製品版も、よろしくね♪"), }, {_T("全ステージクリア、おめでとう!"), _T("かなりいいペース、"), _T("最高ランクまでもう一歩よ…!")}, {_T("全てのステージをクリアしたわ。"), _T("手応えはどうだったかしら?"), _T("もう一回、挑戦してみる?")}, {_T("お疲れ様!"), _T("何とかコツはつかめたかしら?"), _T("次はもっとうまくやれるはずよ!"), }, }; // ルナサの描画 DrawDollIconRot( 140, 470 + (int)dt, DOLL_TYPE_MUSICIAN, DOLL_ATTR_MOON, DOLL_FACE_NORMAL, 1.0f, 0); // 吹き出しの描画 DrawExtendGraph(240, 380 + dt, 720, 560 + dt, g_image.window.balloon[WNDIMGINDEX_NOFRAME], 1); // コメントの代入 if(!g_trialAliceFile.data.dangeonStage[0]){ // チュートリアル1挑戦時 strcpy_s(buf[0], TESTDANGEON_COMMENT_LENGTH-1, _T("さあ、ダンジョンに出発!")); }else if(!g_trialAliceFile.data.dangeonStage[1]){ // チュートリアル2挑戦時 strcpy_s(buf[0], TESTDANGEON_COMMENT_LENGTH-1, _T("ダンジョンで仲間を見つけよう!")); }else if(!g_trialAliceFile.data.dangeonStage[2]){ // チュートリアル2挑戦時 strcpy_s(buf[0], TESTDANGEON_COMMENT_LENGTH-1, _T("相手に応じて、人形チェンジ!")); }else if(!g_trialAliceFile.data.dangeonStage[3]){ // チュートリアル2挑戦時 strcpy_s(buf[0], TESTDANGEON_COMMENT_LENGTH-1, _T("さあ、ここからが本番よ!")); }else if(g_trialAliceFile.data.dangeonStage[8]){ for(int n=0; n<3; n++){ // コメントを一行ずつコピーする strcpy_s(buf[n], TESTDANGEON_COMMENT_LENGTH-1, rankCommentFinal[max(0, g_trialAliceFile.data.finalResult-1)][n]); } }else{ // それ以外の場合 // (状況に応じてコメントが入る) for(int n=0; n<3; n++){ if((int)r_aliceInfo.GetTime() > rankTime[cntStage-1][n]){ rank = n + 1; } } for(int n=0; n<3; n++){ // コメントを一行ずつコピーする strcpy_s(buf[n], TESTDANGEON_COMMENT_LENGTH-1, rankComment[max(0, rank)][n]); } } // コメントの描画 for(int n=0; n<3; n++){ DrawStringToHandle(310, 430 + 35 * n + dt, buf[n], GetPresetColor(PRESETCOLORSET_BROWN, COLORSET_COLOR_NORMAL), g_font.hTalkS); } }
void RoundAnimation::Play( void ) { if(!isEnd) { //アニメーション終了フラグ bool anim_is_end = FALSE; //現在のラウンド取得 int now_draw = 0; if(!RoundIsEnd) { now_draw = 0; } else if(!RoundNumIsEnd) { now_draw = 1; } else { now_draw = 2; } //アニメーション用移動量取得 int x_buf, y_buf; GetGraphSize(Fight_RoundNum_Graph[now_draw] , &x_buf, &y_buf); Animation_X_Size[now_draw] = linearTween(time[now_draw], 0, 600, 5); Animation_Y_Size[now_draw] = linearTween(time[now_draw], 0, 600, 5); if(Animation_X_Size[now_draw] > x_buf) { Animation_X_Size[now_draw] = x_buf; anim_is_end = TRUE; //アニメーション終了 } if(Animation_Y_Size[now_draw] > y_buf) { Animation_Y_Size[now_draw] = y_buf; anim_is_end = TRUE; //アニメーション終了 } x_buf = Animation_X_Size[now_draw]/8; y_buf = Animation_Y_Size[now_draw]/8; time[now_draw]++; //round表示 if(!RoundIsEnd) { DrawExtendGraph(LOGO_POSI_CENTER_X - x_buf, LOGO_POSI_CENTER_Y - y_buf, LOGO_POSI_CENTER_X + x_buf, LOGO_POSI_CENTER_Y + y_buf, Fight_Round_Graph, TRUE); if(anim_time + ANIM_STOP_TIME < Timer::GetTime()){ if(anim_is_end) { RoundIsEnd = TRUE; anim_time = Timer::GetTime(); //ラウンド数SE switch (RoundNum) { case 0: SOUND::SetSoundEffect(SOUND::SE_ONE); break; case 1: SOUND::SetSoundEffect(SOUND::SE_TWO); break; case 2: SOUND::SetSoundEffect(SOUND::SE_FINAL); break; } } } } //ラウンド数表示 else if(!RoundNumIsEnd) { DrawExtendGraph(LOGO_POSI_CENTER_X - x_buf, LOGO_POSI_CENTER_Y - y_buf, LOGO_POSI_CENTER_X + x_buf, LOGO_POSI_CENTER_Y + y_buf, Fight_RoundNum_Graph[RoundNum], TRUE); if(anim_time + ANIM_STOP_TIME < Timer::GetTime()){ if(anim_is_end) { RoundNumIsEnd = TRUE; anim_time = Timer::GetTime(); //ラウンド数SE SOUND::SetSoundEffect(SOUND::SE_FIGHT); } } } //Fight表示 else { DrawExtendGraph(LOGO_POSI_CENTER_X - x_buf, LOGO_POSI_CENTER_Y - y_buf, LOGO_POSI_CENTER_X + x_buf, LOGO_POSI_CENTER_Y + y_buf, Fight_Graph, TRUE); if(anim_time + ANIM_STOP_TIME < Timer::GetTime()){ if(anim_is_end) { isEnd = TRUE; } } } } return; }
void EnemyBigShield::Render(){ DrawExtendGraph(0, 0, 1280, 720, m_image, FALSE); }
void SceneTitle::Paint() { std::cout << "SceneTitlePaint" << std::endl; DrawExtendGraph(0, 0, 100, 100, m_backimage, true); }
void Select() { DrawBox(0, 0, Screen_X, Screen_Y, Status.White, TRUE); DrawGraph(Gp.Select_X, Gp.Select_Y, Graph.Select, TRUE); DrawExtendGraph(Gp.CentrJacket_X, Gp.CentrJacket_Y, Gp.CentrJacket_X + 500, Gp.CentrJacket_Y + 500, Music[Global.TargetMusic].Jacket, TRUE); if (CheckSoundMem(Music[Global.TargetMusic].MusicData) != 1){ PlaySoundMem(Music[Global.TargetMusic].MusicData, DX_PLAYTYPE_LOOP); } if (Global.TargetMusic > 0){ DrawExtendGraph(Gp.LeftJacket_X, Gp.LeftJacket_Y, Gp.LeftJacket_X + 350, Gp.LeftJacket_Y + 350, Music[Global.TargetMusic - 1].Jacket, TRUE); } else{ DrawExtendGraph(Gp.LeftJacket_X, Gp.LeftJacket_Y, Gp.LeftJacket_X + 350, Gp.LeftJacket_Y + 350, Music[Global.MusicCnt - 1].Jacket, TRUE); } if (Global.TargetMusic < Global.MusicCnt - 1){ DrawExtendGraph(Gp.RightJacket_X, Gp.RightJacket_Y, Gp.RightJacket_X + 350, Gp.RightJacket_Y + 350, Music[Global.TargetMusic + 1].Jacket, TRUE); } else{ DrawExtendGraph(Gp.RightJacket_X, Gp.RightJacket_Y, Gp.RightJacket_X + 350, Gp.RightJacket_Y + 350, Music[0].Jacket, TRUE); } if (Global.Key[KEY_INPUT_V] == 1 || Global.Key[KEY_INPUT_F] == 1 || Global.Key[KEY_INPUT_R] == 1 || Global.Key[KEY_INPUT_4] == 1){ PlaySoundMem(Sound.Push, DX_PLAYTYPE_BACK); StopSoundMem(Music[Global.TargetMusic].MusicData); if (Global.TargetMusic > 0){ Global.TargetMusic--; } else{ Global.TargetMusic = Global.MusicCnt - 1; } PlaySoundMem(Music[Global.TargetMusic].MusicData, DX_PLAYTYPE_LOOP); } if (Global.Key[KEY_INPUT_N] == 1 || Global.Key[KEY_INPUT_J] == 1 || Global.Key[KEY_INPUT_I] == 1 || Global.Key[KEY_INPUT_9] == 1){ PlaySoundMem(Sound.Push, DX_PLAYTYPE_BACK); StopSoundMem(Music[Global.TargetMusic].MusicData); if (Global.TargetMusic < Global.MusicCnt - 1){ Global.TargetMusic++; } else{ Global.TargetMusic = 0; } PlaySoundMem(Music[Global.TargetMusic].MusicData, DX_PLAYTYPE_LOOP); } Global.SelectCounter++; if (Global.Key[KEY_INPUT_F1] == 1 || Global.Key[KEY_INPUT_B] == 1){ PlaySoundMem(Sound.Push, DX_PLAYTYPE_NORMAL); Flag.Select = 2; Global.SelectCounter = 0; Global.TargetDiff = 1; Global.Key[KEY_INPUT_F1] = 0; Global.Key[KEY_INPUT_B] = 0; } }
void MusicConfirm() { DrawBox(0, 0, Screen_X, Screen_Y, Status.White, TRUE); DrawGraph(Gp.Select_X, Gp.Select_Y, Graph.Select, TRUE); DrawExtendGraph(Gp.CentrJacket_X, Gp.CentrJacket_Y, Gp.CentrJacket_X + 500, Gp.CentrJacket_Y + 500, Music[Global.TargetMusic].Jacket, TRUE); switch (Global.TargetDiff) { case 0: if (Global.SelectCounter <= 15){ DrawGraph((Screen_X / 2 - Gs.Easy_X) / 2, Gp.CentrJacket_Y + 600, Graph.Easy, TRUE); } DrawGraph((Screen_X - Gs.Normal_X) / 2, Gp.CentrJacket_Y + 600, Graph.Normal, TRUE); DrawGraph((Screen_X + Screen_X / 2 - Gs.Hard_X) / 2, Gp.CentrJacket_Y + 600, Graph.Hard, TRUE); break; case 1: DrawGraph((Screen_X / 2 - Gs.Easy_X) / 2, Gp.CentrJacket_Y + 600, Graph.Easy, TRUE); if (Global.SelectCounter <= 15){ DrawGraph((Screen_X - Gs.Normal_X) / 2, Gp.CentrJacket_Y + 600, Graph.Normal, TRUE); } DrawGraph((Screen_X + Screen_X / 2 - Gs.Hard_X) / 2, Gp.CentrJacket_Y + 600, Graph.Hard, TRUE); break; case 2: DrawGraph((Screen_X / 2 - Gs.Easy_X) / 2, Gp.CentrJacket_Y + 600, Graph.Easy, TRUE); DrawGraph((Screen_X - Gs.Normal_X) / 2, Gp.CentrJacket_Y + 600, Graph.Normal, TRUE); if (Global.SelectCounter <= 15){ DrawGraph((Screen_X + Screen_X / 2 - Gs.Hard_X) / 2, Gp.CentrJacket_Y + 600, Graph.Hard, TRUE); } break; } Global.SelectCounter++; if (Global.SelectCounter > 30){ Global.SelectCounter = 0; } if (Global.Key[KEY_INPUT_V] == 1 || Global.Key[KEY_INPUT_F] == 1 || Global.Key[KEY_INPUT_R] == 1 || Global.Key[KEY_INPUT_4] == 1){ if (Global.TargetDiff > 0) { PlaySoundMem(Sound.Push, DX_PLAYTYPE_BACK); Global.TargetDiff--; } } if (Global.Key[KEY_INPUT_N] == 1 || Global.Key[KEY_INPUT_J] == 1 || Global.Key[KEY_INPUT_I] == 1 || Global.Key[KEY_INPUT_9] == 1){ if (Global.TargetDiff < 2) { PlaySoundMem(Sound.Push, DX_PLAYTYPE_BACK); Global.TargetDiff++; } } if (Global.Key[KEY_INPUT_F1] == 1 || Global.Key[KEY_INPUT_B] == 1){ StopSoundMem(Music[Global.TargetMusic].MusicData); PlaySoundMem(Sound.Push, DX_PLAYTYPE_BACK); Flag.Select = 0; Flag.Game = 1; Global.SelectCounter = 0; // Global.TargetDiff = 1; switch (Global.TargetDiff) { case 0: ChartRead(Music[Global.TargetMusic].MusicName, 'E'); break; case 1: ChartRead(Music[Global.TargetMusic].MusicName, 'N'); break; case 2: ChartRead(Music[Global.TargetMusic].MusicName, 'H'); break; } } }
void EnemyShytarn::Render(){ DrawExtendGraph(0, 0, 1280, 720, m_image, FALSE); }
//左上・右下を指定して描画 void DrawImpl::modi2(const Vector2& pos1, const Vector2& pos2, int GrHandle, int alpha, int blendMode){ SetDrawBlendMode(blendMode, alpha); DrawExtendGraph(pos1.x + dx, pos1.y + dy, pos2.x + dx, pos2.y + dy, GrHandle, 1); }
void Enemy::Render(int x, int y, int width, int height){ DrawExtendGraph(x, y, width, height, m_enemyImage, FALSE); }