• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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


Commit MetaInfo

Revision164 (tree)
Time2017-01-28 01:48:57
Authorxops-mikan

Log Message

VC++にてDebugモードでコンパイルした際のダイアログ表示を変更、コマンド(window)でのリセット処理を改善、オープニングの文字表示を微調整。

Change Summary

Incremental Difference

--- trunk/gamemain.cpp (revision 163)
+++ trunk/gamemain.cpp (revision 164)
@@ -144,8 +144,8 @@
144144 return 1;
145145 }
146146 //if( rtn == 2 ){
147- WindowCtrl->ErrorInfo("Resetに失敗しました");
148- WindowCtrl->CloseWindow();
147+ //WindowCtrl->ErrorInfo("Resetに失敗しました");
148+ //WindowCtrl->CloseWindow();
149149 return -1;
150150 //}
151151 }
@@ -411,13 +411,13 @@
411411 float effectA = 1.0f;
412412 if( framecnt < (int)(8.0f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 7.0f, false); }
413413 if( framecnt > (int)(10.0f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 10.0f, true); }
414- d3dg->Draw2DTextureFontText(330, 300, "REMAKE", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20);
414+ d3dg->Draw2DTextureFontText(SCREEN_WIDTH - 310, 300, "REMAKE", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20);
415415 }
416416 if( ((int)(7.5f*GAMEFPS) < framecnt)&&(framecnt < (int)(11.5f*GAMEFPS)) ){
417417 float effectA = 1.0f;
418418 if( framecnt < (int)(8.5f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 7.5f, false); }
419419 if( framecnt > (int)(10.5f*GAMEFPS) ){ effectA = GetEffectAlpha(framecnt, 1.0f, 1.0f, 10.5f, true); }
420- d3dg->Draw2DTextureFontText(370, 330, "[-_-;](mikan)", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20);
420+ d3dg->Draw2DTextureFontText(SCREEN_WIDTH - 270, 330, "[-_-;](mikan)", d3dg->GetColorCode(1.0f,1.0f,1.0f,effectA), 20, 20);
421421 //d3dg->Draw2DTexture(410, 360, opening_banner, 200, 40, effectA);
422422 }
423423
@@ -3360,6 +3360,8 @@
33603360
33613361 //ウィンドウ・フルスクリーン切り替え
33623362 if( strcmp(NewCommand, "window") == 0 ){
3363+ bool ErrorFlag = false;
3364+
33633365 //現在の表示モード取得
33643366 bool flag = d3dg->GetFullScreenFlag();
33653367
@@ -3366,20 +3368,35 @@
33663368 if( flag == false ){ flag = true; }
33673369 else{ flag = false; }
33683370
3369- //切り替え処理
3371+ //切り替え処理(初回)
33703372 WindowCtrl->ChangeWindowMode(flag);
33713373 d3dg->SetFullScreenFlag(flag);
33723374 if( ResetGame(WindowCtrl) != 0 ){
33733375 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "[Error] Change failed.");
3376+
3377+ if( flag == false ){
3378+ //フルスクリーン⇒ウィンドウが失敗したら、エラーとして終了。
3379+ WindowCtrl->ErrorInfo("Resetに失敗しました");
3380+ WindowCtrl->CloseWindow();
3381+ ErrorFlag = true;
3382+ }
3383+ else{
3384+ //ウィンドウ⇒フルスクリーンが失敗したら、ウィンドウモードへ戻してゲーム続行を試みる。
3385+ // (GPUが指定解像度のフルスクリーンに対応してないとか・・?)
3386+ flag = false;
3387+
3388+ WindowCtrl->ChangeWindowMode(flag);
3389+ d3dg->SetFullScreenFlag(flag);
3390+ if( ResetGame(WindowCtrl) != 0 ){
3391+ //戻しても失敗するなら、エラーとして終了。
3392+ WindowCtrl->ErrorInfo("Resetに失敗しました");
3393+ WindowCtrl->CloseWindow();
3394+ ErrorFlag = true;
3395+ }
3396+ }
33743397 }
33753398 else{
3376- Recovery();
3377-
3378- //キー入力を取得
3379- // ※ディスプレイ解像度の変化によるマウスの移動分を捨てる
3380- inputCtrl->GetInputState(true);
3381- inputCtrl->MoveMouseCenter();
3382-
3399+ //初回で切り替えに成功したら、成功メッセージを表示。
33833400 if( flag == true ){
33843401 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "Changed FullScreen mode.");
33853402 }
@@ -3387,6 +3404,16 @@
33873404 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "Changed Window mode.");
33883405 }
33893406 }
3407+
3408+ //切り替えに成功したら、回復などの後処理。
3409+ if( ErrorFlag == false ){
3410+ Recovery();
3411+
3412+ //キー入力を取得
3413+ // ※ディスプレイ解像度の変化によるマウスの移動分を捨てる
3414+ inputCtrl->GetInputState(true);
3415+ inputCtrl->MoveMouseCenter();
3416+ }
33903417 }
33913418
33923419 //スクリーンショットを撮影
@@ -3578,7 +3605,11 @@
35783605 Opening->Sound();
35793606 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
35803607 if( Opening->RenderMain() == true ){
3581- if( ResetGame(WindowCtrl) == 0 ){
3608+ if( ResetGame(WindowCtrl) != 0 ){
3609+ WindowCtrl->ErrorInfo("Resetに失敗しました");
3610+ WindowCtrl->CloseWindow();
3611+ }
3612+ else{
35823613 Opening->Recovery();
35833614
35843615 //現在の画面を再スタートさせる
@@ -3614,7 +3645,11 @@
36143645 MainMenu->Sound();
36153646 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
36163647 if( MainMenu->RenderMain() == true ){
3617- if( ResetGame(WindowCtrl) == 0 ){
3648+ if( ResetGame(WindowCtrl) != 0 ){
3649+ WindowCtrl->ErrorInfo("Resetに失敗しました");
3650+ WindowCtrl->CloseWindow();
3651+ }
3652+ else{
36183653 MainMenu->Recovery();
36193654
36203655 //現在の画面を再スタートさせる
@@ -3644,7 +3679,11 @@
36443679 Briefing->Process();
36453680 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
36463681 if( Briefing->RenderMain() == true ){
3647- if( ResetGame(WindowCtrl) == 0 ){
3682+ if( ResetGame(WindowCtrl) != 0 ){
3683+ WindowCtrl->ErrorInfo("Resetに失敗しました");
3684+ WindowCtrl->CloseWindow();
3685+ }
3686+ else{
36483687 Briefing->Recovery();
36493688
36503689 //現在の画面を再スタートさせる
@@ -3682,7 +3721,11 @@
36823721 }
36833722 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
36843723 if( MainGame->RenderMain() == true ){
3685- if( ResetGame(WindowCtrl) == 0 ){
3724+ if( ResetGame(WindowCtrl) != 0 ){
3725+ WindowCtrl->ErrorInfo("Resetに失敗しました");
3726+ WindowCtrl->CloseWindow();
3727+ }
3728+ else{
36863729 MainGame->Recovery();
36873730
36883731 //現在の画面を再スタートさせる
@@ -3708,7 +3751,11 @@
37083751 Result->Process();
37093752 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
37103753 if( Result->RenderMain() == true ){
3711- if( ResetGame(WindowCtrl) == 0 ){
3754+ if( ResetGame(WindowCtrl) != 0 ){
3755+ WindowCtrl->ErrorInfo("Resetに失敗しました");
3756+ WindowCtrl->CloseWindow();
3757+ }
3758+ else{
37123759 Result->Recovery();
37133760
37143761 //現在の画面を再スタートさせる
--- trunk/main.cpp (revision 163)
+++ trunk/main.cpp (revision 164)
@@ -100,9 +100,12 @@
100100 }
101101
102102 #ifdef _DEBUG
103- char str[24];
104- GameConfig.GetPlayerName(str);
105- MessageBox(NULL, str, "プレイヤー名", MB_OK);
103+ //char str[24];
104+ //GameConfig.GetPlayerName(str);
105+ //MessageBox(NULL, str, "プレイヤー名", MB_OK);
106+ char str[255];
107+ strcpy(str, "The compiler is the Debug mode.\nIf release the software, Switch compiler to Release mode.");
108+ MessageBox(NULL, str, "Information", MB_OK);
106109 #endif
107110
108111 //ウィンドウ初期化