• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。


Commit MetaInfo

Revision298 (tree)
Zeit2022-03-28 02:00:01
Autorxops-mikan

Log Message

メニュー画面におけるマウス座標の処理とスクロールバーの処理を変更、ゲーム中の任務達成・失敗の演出改善

Ändern Zusammenfassung

Diff

--- trunk/gamemain.cpp (revision 297)
+++ trunk/gamemain.cpp (revision 298)
@@ -625,10 +625,10 @@
625625
626626 //マウス座標を取得
627627 inputCtrl->GetMouseMovement(&mainmenu_mouseX, &mainmenu_mouseY);
628- if( mainmenu_mouseX < 0 ){ mainmenu_mouseX = 0; }
629- if( mainmenu_mouseX > GameConfig.GetScreenWidth()-1 ){ mainmenu_mouseX = GameConfig.GetScreenWidth()-1; }
630- if( mainmenu_mouseY < 0 ){ mainmenu_mouseY = 0; }
631- if( mainmenu_mouseY > GameConfig.GetScreenHeight()-1 ){ mainmenu_mouseY = GameConfig.GetScreenHeight()-1; }
628+ //if( mainmenu_mouseX < 0 ){ mainmenu_mouseX = 0; }
629+ //if( mainmenu_mouseX > GameConfig.GetScreenWidth()-1 ){ mainmenu_mouseX = GameConfig.GetScreenWidth()-1; }
630+ //if( mainmenu_mouseY < 0 ){ mainmenu_mouseY = 0; }
631+ //if( mainmenu_mouseY > GameConfig.GetScreenHeight()-1 ){ mainmenu_mouseY = GameConfig.GetScreenHeight()-1; }
632632
633633 if( modescreen == 0 ){
634634 //スクロールバーを処理し情報取得
@@ -791,13 +791,16 @@
791791 //スクロールバーの情報を取得
792792 int scrollitems;
793793 int totalmission;
794+ bool scrolling;
794795 if( GameInfoData.selectmission_id >= 0 ){
795796 scrollitems = scrollbar_official.GetScrollItem();
796797 totalmission = TOTAL_OFFICIALMISSION;
798+ scrolling = scrollbar_official.CheckScrolling();
797799 }
798800 else{
799801 scrollitems = scrollbar_addon.GetScrollItem();
800802 totalmission = GameAddon.GetTotaldatas();
803+ scrolling = scrollbar_addon.CheckScrolling();
801804 }
802805
803806 //メニューエリア描画
@@ -821,7 +824,7 @@
821824 d3dg->Draw2DTextureFontText(MAINMENU_X+1, MAINMENU_Y+1, "< UP >", d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f), 25, 26);
822825
823826 //文字の色を設定
824- if( (MAINMENU_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_X+340))&&(MAINMENU_Y < mainmenu_mouseY)&&(mainmenu_mouseY < MAINMENU_Y+30) ){
827+ if( (MAINMENU_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_X+340))&&(MAINMENU_Y < mainmenu_mouseY)&&(mainmenu_mouseY < MAINMENU_Y+30)&&(scrolling == false) ){
825828 color = d3dg->GetColorCode(0.0f,1.0f,1.0f,1.0f);
826829 }
827830 else{
@@ -840,7 +843,7 @@
840843 d3dg->Draw2DTextureFontText(MAINMENU_X+1, MAINMENU_Y+MAINMENU_H-55+1, "< DOWN >", d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f), 25, 26);
841844
842845 //文字の色を設定
843- if( (MAINMENU_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_X+340))&&((MAINMENU_Y+MAINMENU_H-55) < mainmenu_mouseY)&&(mainmenu_mouseY < (MAINMENU_Y+MAINMENU_H-55+30)) ){
846+ if( (MAINMENU_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_X+340))&&((MAINMENU_Y+MAINMENU_H-55) < mainmenu_mouseY)&&(mainmenu_mouseY < (MAINMENU_Y+MAINMENU_H-55+30))&&(scrolling == false) ){
844847 color = d3dg->GetColorCode(0.0f,1.0f,1.0f,1.0f);
845848 }
846849 else{
@@ -859,7 +862,7 @@
859862 //addonがあれば
860863 if( GameAddon.GetTotaldatas() > 0 ){
861864 //文字の色を設定
862- if( (MAINMENU_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_X+340))&&((MAINMENU_Y+MAINMENU_H-25) < mainmenu_mouseY)&&(mainmenu_mouseY < (MAINMENU_Y+MAINMENU_H-2)) ){
865+ if( (MAINMENU_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_X+340))&&((MAINMENU_Y+MAINMENU_H-25) < mainmenu_mouseY)&&(mainmenu_mouseY < (MAINMENU_Y+MAINMENU_H-2))&&(scrolling == false) ){
863866 color = d3dg->GetColorCode(0.0f,1.0f,1.0f,1.0f);
864867 }
865868 else{
@@ -875,7 +878,7 @@
875878 //addonがあれば
876879 //if( GameAddon.GetTotaldatas() > 0 ){
877880 //文字の色を設定
878- if( (MAINMENU_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_X+340))&&((MAINMENU_Y+MAINMENU_H-25) < mainmenu_mouseY)&&(mainmenu_mouseY < (MAINMENU_Y+MAINMENU_H-2)) ){
881+ if( (MAINMENU_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_X+340))&&((MAINMENU_Y+MAINMENU_H-25) < mainmenu_mouseY)&&(mainmenu_mouseY < (MAINMENU_Y+MAINMENU_H-2))&&(scrolling == false) ){
879882 color = d3dg->GetColorCode(0.0f,1.0f,1.0f,1.0f);
880883 }
881884 else{
@@ -902,7 +905,7 @@
902905 }
903906
904907 //文字の色を設定
905- if( (MAINMENU_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_X+(signed)strlen(name)*20))&&(MAINMENU_Y+30 + i*30 < mainmenu_mouseY)&&(mainmenu_mouseY < MAINMENU_Y+30 + i*30 + 26) ){
908+ if( (MAINMENU_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_X+(signed)strlen(name)*20))&&(MAINMENU_Y+30 + i*30 < mainmenu_mouseY)&&(mainmenu_mouseY < MAINMENU_Y+30 + i*30 + 26)&&(scrolling == false) ){
906909 color = d3dg->GetColorCode(1.0f,0.6f,0.6f,1.0f);
907910 }
908911 else{
@@ -919,7 +922,7 @@
919922 d3dg->Draw2DBox(MAINMENU_OPTION_X, MAINMENU_OPTION_Y, MAINMENU_OPTION_X+132+2, MAINMENU_OPTION_Y+16+2, d3dg->GetColorCode(0.0f,0.0f,0.0f,0.5f));
920923
921924 //文字の色を設定
922- if( (MAINMENU_OPTION_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_OPTION_X+132+2))&&(MAINMENU_OPTION_Y < mainmenu_mouseY)&&(mainmenu_mouseY < MAINMENU_OPTION_Y+16) ){
925+ if( (MAINMENU_OPTION_X < mainmenu_mouseX)&&(mainmenu_mouseX < (MAINMENU_OPTION_X+132+2))&&(MAINMENU_OPTION_Y < mainmenu_mouseY)&&(mainmenu_mouseY < MAINMENU_OPTION_Y+16)&&(scrolling == false) ){
923926 color = d3dg->GetColorCode(0.0f,1.0f,1.0f,1.0f);
924927 }
925928 else{
@@ -2666,7 +2669,7 @@
26662669 end_framecnt += 1;
26672670 }
26682671 else if( end_framecnt > 0 ){ //ミッション終了中ならば
2669- if( end_framecnt < (int)(5.0f*GAMEFPS) ){
2672+ if( end_framecnt < (int)(4.0f*GAMEFPS) ){
26702673 end_framecnt += 1;
26712674 }
26722675 else{
@@ -3242,8 +3245,8 @@
32423245 if( end_framecnt < (int)(1.0f*GAMEFPS) ){
32433246 effect = GetEffectAlpha(end_framecnt, 1.0f, 1.0f, 0.0f, false);
32443247 }
3245- else if( end_framecnt > (int)(4.0f*GAMEFPS) ){
3246- effect = GetEffectAlpha(end_framecnt, 1.0f, 1.0f, 4.0f, true);
3248+ else if( end_framecnt > (int)(3.0f*GAMEFPS) ){
3249+ effect = GetEffectAlpha(end_framecnt, 1.0f, 1.0f, 3.0f, true);
32473250 }
32483251 else{
32493252 effect = 1.0f;
--- trunk/gui-object.cpp (revision 297)
+++ trunk/gui-object.cpp (revision 298)
@@ -143,6 +143,14 @@
143143 }
144144 }
145145
146+//! @brief スクロール中か判定
147+//! @return スクロール中である:true スクロール中でない:false
148+bool ScrollbarObject::CheckScrolling()
149+{
150+ if( mouse_mode == 2 ){ return true; }
151+ return false;
152+}
153+
146154 //! @brief スクロールバー入力処理
147155 //! @param mouse_x マウスx座標
148156 //! @param mouse_y マウスy座標
--- trunk/gui-object.h (revision 297)
+++ trunk/gui-object.h (revision 298)
@@ -70,6 +70,7 @@
7070 int GetScrollItem();
7171 void ScrollUP();
7272 void ScrollDOWN();
73+ bool CheckScrolling();
7374 void Input(int mouse_x, int mouse_y, bool mouse_click, int scroll_y);
7475 void Draw(class D3DGraphics *d3dg);
7576 };