• 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

Revision117 (tree)
Time2015-12-27 02:27:23
Authorxops-mikan

Log Message

コンソールのコマンドを1個追加(speed)

Change Summary

Incremental Difference

--- trunk/gamemain.cpp (revision 116)
+++ trunk/gamemain.cpp (revision 117)
@@ -1034,6 +1034,12 @@
10341034 maingame::~maingame()
10351035 {}
10361036
1037+//! @brief ゲームの実行速度を取得
1038+int maingame::GetGameSpeed()
1039+{
1040+ return GameSpeed;
1041+}
1042+
10371043 int maingame::Create()
10381044 {
10391045 MainGameInfo = GameInfoData;
@@ -1130,6 +1136,7 @@
11301136 start_framecnt = 0;
11311137 end_framecnt = 0;
11321138 EventStop = false;
1139+ GameSpeed = 1;
11331140 message_id = -1;
11341141 message_cnt = 0;
11351142 redflash_flag = false;
@@ -1353,9 +1360,11 @@
13531360
13541361 if( inputCtrl->CheckKeyDown(GetEscKeycode()) ){ //ゲーム終了操作かチェック
13551362 GameState->PushBackSpaceKey();
1363+ GameSpeed = 1;
13561364 }
13571365 else if( inputCtrl->CheckKeyDown( GetFunctionKeycode(12) ) ){ //リセット操作かチェック
13581366 GameState->PushF12Key();
1367+ GameSpeed = 1;
13591368 }
13601369
13611370 //カメラ表示モード変更操作かチェック
@@ -1886,6 +1895,7 @@
18861895 GameInfoData.headshot = MainGameInfo.headshot; //敵の頭部に命中した数
18871896
18881897 GameState->PushMouseButton();
1898+ GameSpeed = 1;
18891899 }
18901900 }
18911901 }
@@ -2676,7 +2686,7 @@
26762686 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "revive treat <NUM> nodamage <NUM>");
26772687 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "kill <NUM> break <NUM> newobj <NUM> ff");
26782688 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "bot nofight caution stop");
2679- AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "estop ss clear");
2689+ AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "estop speed ss clear");
26802690 }
26812691
26822692 //人の統計情報
@@ -3029,6 +3039,16 @@
30293039 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), str);
30303040 }
30313041
3042+ //ゲームの実行速度
3043+ if( strcmp(NewCommand, "speed") == 0 ){
3044+ if( GameSpeed == 1 ){ GameSpeed = 2; }
3045+ else if( GameSpeed == 2 ){ GameSpeed = 4; }
3046+ else{ GameSpeed = 1; }
3047+
3048+ sprintf(str, "Set GameSpeed x%d", GameSpeed);
3049+ AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), str);
3050+ }
3051+
30323052 //スクリーンショットを撮影
30333053 // ※コンソール画面を削除するため、撮影を1フレーム遅らせる。
30343054 if( ScreenShot == 2 ){
@@ -3067,6 +3087,7 @@
30673087 //リセット操作
30683088 if( strcmp(NewCommand, "f12") == 0 ){
30693089 GameState->PushF12Key();
3090+ GameSpeed = 1;
30703091 }
30713092 #endif
30723093 }
@@ -3308,9 +3329,11 @@
33083329
33093330 //メインゲーム実行
33103331 case STATE_NOW_MAINGAME:
3311- MainGame->Input();
3312- MainGame->Process();
3313- MainGame->Sound();
3332+ for(int i=0; i<MainGame->GetGameSpeed(); i++){
3333+ MainGame->Input();
3334+ MainGame->Process();
3335+ MainGame->Sound();
3336+ }
33143337 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
33153338 if( MainGame->RenderMain() == true ){
33163339 if( ResetGame(WindowCtrl) == 0 ){
--- trunk/gamemain.h (revision 116)
+++ trunk/gamemain.h (revision 117)
@@ -182,6 +182,7 @@
182182 int start_framecnt; //!< メインゲーム開始時のカウント
183183 int end_framecnt; //!< メインゲーム終了のカウント
184184 bool EventStop; //!< イベント処理を停止する
185+ int GameSpeed; //!< ゲームの実行速度(1以上の整数値)
185186 int message_id; //!< 表示中のイベントメッセージ番号
186187 int message_cnt; //!< 表示中のイベントメッセージカウント
187188 bool redflash_flag; //!< レッドフラッシュ描画フラグ
@@ -217,6 +218,7 @@
217218 public:
218219 maingame();
219220 ~maingame();
221+ int GetGameSpeed();
220222 int Create();
221223 int Recovery();
222224 void Input();