• 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

Revision112 (tree)
Time2015-09-26 20:16:28
Authorxops-mikan

Log Message

Direct3Dデバイスをリセットする際、シーン自体をリセットしないように。 (フルスクリーン時 Alt + Tab キーなどの切り替えに完全対応)

Change Summary

Incremental Difference

--- trunk/gamemain.h (revision 111)
+++ trunk/gamemain.h (revision 112)
@@ -102,6 +102,7 @@
102102 opening();
103103 ~opening();
104104 int Create();
105+ int Recovery();
105106 void Input();
106107 void Process();
107108 void Destroy();
@@ -111,6 +112,7 @@
111112 //! @details メニュー画面を管理します。
112113 class mainmenu : public D3Dscene
113114 {
115+ char demopath[MAX_PATH]; //!< デモファイルのパス
114116 int mainmenu_mouseX; //!< メニュー画面マウスX座標
115117 int mainmenu_mouseY; //!< メニュー画面マウスY座標
116118 int mainmenu_scrollitems_official; //!< メニュー画面のスクロールしたアイテム数
@@ -130,6 +132,7 @@
130132 mainmenu();
131133 ~mainmenu();
132134 int Create();
135+ int Recovery();
133136 void Input();
134137 void Process();
135138 void Destroy();
@@ -148,6 +151,7 @@
148151 briefing();
149152 ~briefing();
150153 int Create();
154+ int Recovery();
151155 void Destroy();
152156 };
153157
@@ -214,6 +218,7 @@
214218 maingame();
215219 ~maingame();
216220 int Create();
221+ int Recovery();
217222 void Input();
218223 void Process();
219224 void Sound();
--- trunk/d3dgraphics-directx.cpp (revision 111)
+++ trunk/d3dgraphics-directx.cpp (revision 112)
@@ -181,12 +181,17 @@
181181
182182 #ifdef ENABLE_DEBUGLOG
183183 //ログに出力
184- OutputLog.WriteLog(LOG_INIT, "グラフィック", "DirectX(リセット)");
184+ OutputLog.WriteLog(LOG_CHECK, "グラフィック", "DirectXデバイス消失");
185185 #endif
186186
187187 //リソース解放
188188 CleanupD3Dresource();
189189
190+#ifdef ENABLE_DEBUGLOG
191+ //ログに出力
192+ OutputLog.WriteLog(LOG_INIT, "グラフィック", "DirectX(リセット)");
193+#endif
194+
190195 D3DPRESENT_PARAMETERS d3dpp;
191196 RECT rec;
192197
@@ -1128,6 +1133,8 @@
11281133 //! @brief マップデータを解放
11291134 void D3DGraphics::CleanupMapdata()
11301135 {
1136+ if( (g_pVB == NULL)&&(bs == 0)&&(blockdata == NULL) ){ return; }
1137+
11311138 //テクスチャを開放
11321139 for(int i=0; i<TOTAL_BLOCKTEXTURE; i++){
11331140 CleanupTexture(mapTextureID[i]);
--- trunk/input.cpp (revision 111)
+++ trunk/input.cpp (revision 112)
@@ -539,7 +539,7 @@
539539 //! @param id Shiftキー:0 Ctrlキー:1
540540 //! @param *CodeL 左側キーのキーコードを受け取るポインタ
541541 //! @param *CodeR 右側キーのキーコードを受け取るポインタ
542-//! @return 成功:ture 失敗:false 
542+//! @return 成功:true 失敗:false 
543543 bool GetDoubleKeyCode(int id, int *CodeL, int *CodeR)
544544 {
545545 #ifdef INPUT_DIRECTINPUT
--- trunk/objectmanager.cpp (revision 111)
+++ trunk/objectmanager.cpp (revision 112)
@@ -114,7 +114,7 @@
114114 int bulletmodel, bullettexture;
115115 Resource->GetBulletModelTexture(&bulletmodel, &bullettexture);
116116 for(int i=0; i<MAX_BULLET; i++){
117- BulletIndex[i].SetModel(bulletmodel, 1.0f);
117+ BulletIndex[i].SetModel(bulletmodel, BULLET_SCALE);
118118 BulletIndex[i].SetTexture(bullettexture);
119119 }
120120
@@ -413,20 +413,20 @@
413413 return -1;
414414 }
415415
416- for(int j=0; j<MAX_SMALLOBJECT; j++){
417- if( SmallObjectIndex[j].GetEnableFlag() == false ){
416+ for(int i=0; i<MAX_SMALLOBJECT; i++){
417+ if( SmallObjectIndex[i].GetEnableFlag() == false ){
418418 //初期化
419- SmallObjectIndex[j].SetPosData(data.x, data.y, data.z, data.r);
420- SmallObjectIndex[j].SetParamData(data.p2, data.p4, true);
421- SmallObjectIndex[j].SetModel(model, 5.0f);
422- SmallObjectIndex[j].SetTexture(texture);
423- SmallObjectIndex[j].SetEnableFlag(true);
419+ SmallObjectIndex[i].SetPosData(data.x, data.y, data.z, data.r);
420+ SmallObjectIndex[i].SetParamData(data.p2, data.p4, true);
421+ SmallObjectIndex[i].SetModel(model, SMALLOBJECT_SCALE);
422+ SmallObjectIndex[i].SetTexture(texture);
423+ SmallObjectIndex[i].SetEnableFlag(true);
424424
425425 //位置修正フラグが有効ならば、マップと判定
426426 if( data.p3 !=0 ){
427- SmallObjectIndex[j].CollisionMap(CollD);
427+ SmallObjectIndex[i].CollisionMap(CollD);
428428 }
429- return j;
429+ return i;
430430 }
431431 }
432432 return -1;
@@ -453,7 +453,7 @@
453453 //初期化
454454 SmallObjectIndex[j].SetPosData(px, py, pz, rx);
455455 SmallObjectIndex[j].SetParamData(paramID, 0, true);
456- SmallObjectIndex[j].SetModel(model, 5.0f);
456+ SmallObjectIndex[j].SetModel(model, SMALLOBJECT_SCALE);
457457 SmallObjectIndex[j].SetTexture(texture);
458458 SmallObjectIndex[j].SetEnableFlag(true);
459459
@@ -715,12 +715,12 @@
715715
716716 //当たり判定の大きさを取得
717717 if( id == TOTAL_PARAMETERINFO_SMALLOBJECT+1 -1 ){
718- decide = (float)MIFdata->GetAddSmallobjectDecide()*SMALLOBJECT_SCALE;
718+ decide = (float)MIFdata->GetAddSmallobjectDecide()*SMALLOBJECT_COLLISIONSCALE;
719719 }
720720 else{
721721 SmallObjectParameter Param;
722722 GameParamInfo->GetSmallObject(id, &Param);
723- decide = (float)Param.decide*SMALLOBJECT_SCALE;
723+ decide = (float)Param.decide*SMALLOBJECT_COLLISIONSCALE;
724724 }
725725
726726 //当たり判定
@@ -807,12 +807,12 @@
807807
808808 //当たり判定の大きさを取得
809809 if( id == TOTAL_PARAMETERINFO_SMALLOBJECT+1 -1 ){
810- decide = (int)( (float)MIFdata->GetAddSmallobjectDecide()*SMALLOBJECT_SCALE );
810+ decide = (int)( (float)MIFdata->GetAddSmallobjectDecide()*SMALLOBJECT_COLLISIONSCALE );
811811 }
812812 else{
813813 SmallObjectParameter Param;
814814 GameParamInfo->GetSmallObject(id, &Param);
815- decide = (int)( (float)Param.decide*SMALLOBJECT_SCALE );
815+ decide = (int)( (float)Param.decide*SMALLOBJECT_COLLISIONSCALE );
816816 }
817817
818818 //貫通力を計算
@@ -1285,6 +1285,118 @@
12851285 }
12861286 }
12871287
1288+//! @brief リソースの回復
1289+//! @todo 全てのエフェクトが無効化する。
1290+void ObjectManager::Recovery()
1291+{
1292+ //人のモデル番号を取得
1293+ int upmodel[TOTAL_UPMODE];
1294+ int armmodel[TOTAL_ARMMODE];
1295+ int legmodel;
1296+ int walkmodel[TOTAL_WALKMODE];
1297+ int runmodel[TOTAL_RUNMODE];
1298+ Resource->GetHumanModel(upmodel, armmodel, &legmodel, walkmodel, runmodel);
1299+
1300+ //人
1301+ int HumanID;
1302+ int GetHumanFlag;
1303+ HumanParameter HumanParam;
1304+ for(int i=0; i<MAX_HUMAN; i++){
1305+ if( HumanIndex[i].GetEnableFlag() == true ){
1306+ HumanIndex[i].GetParamData(&HumanID, NULL, NULL, NULL);
1307+
1308+ GetHumanFlag = GameParamInfo->GetHuman(HumanID, &HumanParam);
1309+
1310+ if( GetHumanFlag == 0 ){
1311+ //人のテクスチャを登録
1312+ Resource->AddHumanTexture(HumanID);
1313+
1314+ //読み込めなければ、前回読み込んだテクスチャ番号を利用
1315+ //読み込めれば、今回読み込むテクスチャ番号を上書き
1316+ int id = Resource->GetHumanTexture(HumanID);
1317+ if( id == -1 ){
1318+ id = AddHumanIndex_TextureID;
1319+ }
1320+ else{
1321+ AddHumanIndex_TextureID = id;
1322+ }
1323+
1324+ HumanIndex[i].SetTexture(id);
1325+ HumanIndex[i].SetModel(upmodel[ HumanParam.model ], armmodel, legmodel, walkmodel, runmodel);
1326+ }
1327+ else{
1328+ //今回読み込むテクスチャ番号を上書き
1329+ AddHumanIndex_TextureID = d3dg->GetMapTextureID(0);
1330+
1331+ HumanIndex[i].SetTexture(AddHumanIndex_TextureID);
1332+ HumanIndex[i].SetModel(upmodel[0], armmodel, legmodel, walkmodel, runmodel);
1333+ }
1334+ }
1335+ }
1336+
1337+ //武器
1338+ int WeaponID;
1339+ int Weaponmodel, Weapontexture;
1340+ for(int i=0; i<MAX_WEAPON; i++){
1341+ if( WeaponIndex[i].GetEnableFlag() == true ){
1342+ //設定値を取得
1343+ WeaponParameter WeaponParam;
1344+ WeaponIndex[i].GetParamData(&WeaponID, NULL, NULL);
1345+ if( Resource->GetWeaponModelTexture(WeaponID, &Weaponmodel, &Weapontexture) == 1 ){ continue; }
1346+ if( GameParamInfo->GetWeapon(WeaponID, &WeaponParam) == 1 ){ continue; }
1347+
1348+ //適用
1349+ WeaponIndex[i].SetModel(Weaponmodel, WeaponParam.size);
1350+ WeaponIndex[i].SetTexture(Weapontexture);
1351+ }
1352+ }
1353+
1354+ //小物
1355+ int SmallObjectID;
1356+ int SmallObjectmodel, SmallObjecttexture;
1357+ for(int i=0; i<MAX_SMALLOBJECT; i++){
1358+ if( SmallObjectIndex[i].GetEnableFlag() == true ){
1359+ //設定値を取得
1360+ SmallObjectIndex[i].GetParamData(&SmallObjectID, NULL);
1361+ if( Resource->GetSmallObjectModelTexture(SmallObjectID, &SmallObjectmodel, &SmallObjecttexture) == 1 ){ continue; }
1362+
1363+ //適用
1364+ SmallObjectIndex[i].SetModel(SmallObjectmodel, SMALLOBJECT_SCALE);
1365+ SmallObjectIndex[i].SetTexture(SmallObjecttexture);
1366+ }
1367+ }
1368+
1369+ //銃弾適用
1370+ int bulletmodel, bullettexture;
1371+ Resource->GetBulletModelTexture(&bulletmodel, &bullettexture);
1372+ for(int i=0; i<MAX_BULLET; i++){
1373+ BulletIndex[i].SetModel(bulletmodel, BULLET_SCALE);
1374+ BulletIndex[i].SetTexture(bullettexture);
1375+ }
1376+
1377+ //手榴弾のリソースとモデルサイズを取得
1378+ int grenademodel, grenadetexture;
1379+ float model_size = 1.0f;
1380+ WeaponParameter ParamData;
1381+ Resource->GetWeaponModelTexture(ID_WEAPON_GRENADE, &grenademodel, &grenadetexture);
1382+ if( GameParamInfo->GetWeapon(ID_WEAPON_GRENADE, &ParamData) == 0 ){
1383+ model_size = ParamData.size;
1384+ }
1385+
1386+ //手榴弾適用
1387+ for(int i=0; i<MAX_GRENADE; i++){
1388+ GrenadeIndex[i].SetModel(grenademodel, model_size);
1389+ GrenadeIndex[i].SetTexture(grenadetexture);
1390+ }
1391+
1392+ //全てのエフェクトを無効化
1393+ for(int i=0; i<MAX_EFFECT; i++){
1394+ if( EffectIndex[i].GetEnableFlag() == true ){
1395+ EffectIndex[i].SetEnableFlag(false);
1396+ }
1397+ }
1398+}
1399+
12881400 //! @brief FF(同士討ち)有効化フラグを取得
12891401 //! @return フラグ
12901402 bool ObjectManager::GetFriendlyFireFlag()
--- trunk/scene.h (revision 111)
+++ trunk/scene.h (revision 112)
@@ -50,6 +50,7 @@
5050 ~scene();
5151 virtual void SetClass(StateMachine *in_GameState, D3DGraphics *in_d3dg, InputControl *in_inputCtrl);
5252 virtual int Create();
53+ virtual int Recovery();
5354 virtual void Input();
5455 virtual void Process();
5556 virtual bool RenderMain();
@@ -70,6 +71,7 @@
7071 D2Dscene();
7172 ~D2Dscene();
7273 virtual int Create();
74+ virtual int Recovery();
7375 virtual bool RenderMain();
7476 virtual void Destroy();
7577 };
--- trunk/gamemain.cpp (revision 111)
+++ trunk/gamemain.cpp (revision 112)
@@ -119,10 +119,13 @@
119119 }
120120
121121 //! @brief リソースをリセットする
122-//! @return 失敗:1 それ以外:0
122+//! @return 成功:0 失敗:-1 待機:1
123123 //! @attention 通常は、描画処理に失敗した場合に限り呼び出してください。
124124 int ResetGame(WindowControl *WindowCtrl)
125125 {
126+ //リストを正しく解放するため、予め呼ぶ。
127+ Resource.CleanupHumanTexture();
128+
126129 int rtn = d3dg.ResetD3D(WindowCtrl);
127130
128131 if( rtn == 0 ){
@@ -134,18 +137,17 @@
134137 Resource.LoadBulletModelTexture();
135138 Resource.LoadEffectTexture();
136139
137- //現在の画面を再スタートさせる
138- GameState.PushF12Key();
140+ //WindowCtrl->ErrorInfo("Recovery...");
141+ return 0;
139142 }
140143 if( rtn == 1 ){
141- //
144+ return 1;
142145 }
143- if( rtn == 2 ){
146+ //if( rtn == 2 ){
144147 WindowCtrl->ErrorInfo("Resetに失敗しました");
145148 WindowCtrl->CloseWindow();
146- return 1;
147- }
148- return 0;
149+ return -1;
150+ //}
149151 }
150152
151153 //! @brief 基本的な解放処理
@@ -224,6 +226,22 @@
224226 return 0;
225227 }
226228
229+int opening::Recovery()
230+{
231+ //ブロックデータ初期化
232+ d3dg->LoadMapdata(&BlockData, "data\\map10\\");
233+
234+ //ポイントデータ初期化
235+ ObjMgr.Recovery();
236+
237+ //背景空読み込み
238+ Resource.LoadSkyModelTexture(1);
239+
240+ //opening_banner = d3dg->LoadTexture("banner.png", true, false);
241+
242+ return 0;
243+}
244+
227245 void opening::Input()
228246 {
229247 inputCtrl->GetInputState(false);
@@ -392,6 +410,7 @@
392410 //! @brief コンストラクタ
393411 mainmenu::mainmenu()
394412 {
413+ demopath[0] = 0x00;
395414 mainmenu_scrollitems_official = 0;
396415 mainmenu_scrollitems_addon = 0;
397416 }
@@ -402,7 +421,6 @@
402421
403422 int mainmenu::Create()
404423 {
405- char path[MAX_PATH];
406424 char bdata[MAX_PATH];
407425 char pdata[MAX_PATH];
408426 int blockflag, pointflag;
@@ -410,27 +428,27 @@
410428 //デモを決定し読み込む
411429 switch( GetRand(6) ){
412430 case 0:
413- strcpy(path, "data\\map2\\");
431+ strcpy(demopath, "data\\map2\\");
414432 break;
415433 case 1:
416- strcpy(path, "data\\map4\\");
434+ strcpy(demopath, "data\\map4\\");
417435 break;
418436 case 2:
419- strcpy(path, "data\\map5\\");
437+ strcpy(demopath, "data\\map5\\");
420438 break;
421439 case 3:
422- strcpy(path, "data\\map7\\");
440+ strcpy(demopath, "data\\map7\\");
423441 break;
424442 case 4:
425- strcpy(path, "data\\map8\\");
443+ strcpy(demopath, "data\\map8\\");
426444 break;
427445 case 5:
428- strcpy(path, "data\\map16\\");
446+ strcpy(demopath, "data\\map16\\");
429447 break;
430448 }
431- strcpy(bdata, path);
449+ strcpy(bdata, demopath);
432450 strcat(bdata, "temp.bd1");
433- strcpy(pdata, path);
451+ strcpy(pdata, demopath);
434452 strcat(pdata, "demo.pd1");
435453
436454 //ブロックデータ読み込み
@@ -448,7 +466,7 @@
448466
449467 //ブロックデータ初期化
450468 BlockData.CalculationBlockdata(false);
451- d3dg->LoadMapdata(&BlockData, path);
469+ d3dg->LoadMapdata(&BlockData, demopath);
452470 CollD.InitCollision(&BlockData);
453471
454472 //ポイントデータ初期化
@@ -498,6 +516,19 @@
498516 return 0;
499517 }
500518
519+int mainmenu::Recovery()
520+{
521+ //ブロックデータ初期化
522+ d3dg->LoadMapdata(&BlockData, demopath);
523+
524+ //ポイントデータ初期化
525+ ObjMgr.Recovery();
526+
527+ gametitle = d3dg->LoadTexture("data\\title.dds", false, false);
528+
529+ return 0;
530+}
531+
501532 void mainmenu::Input()
502533 {
503534 inputCtrl->GetInputState(false);
@@ -905,6 +936,32 @@
905936 return 0;
906937 }
907938
939+int briefing::Recovery()
940+{
941+ char PictureA[MAX_PATH];
942+ char PictureB[MAX_PATH];
943+
944+ //背景画像を取得
945+ gametitle = d3dg->LoadTexture("data\\title.dds", false, false);
946+
947+ //ブリーフィング画像のファイルパス取得
948+ MIFdata.GetPicturefilePath(PictureA, PictureB);
949+
950+ //ブリーフィング画像読み込み
951+ if( strcmp(PictureB, "!") == 0 ){
952+ TwoTexture = false;
953+ TextureA = d3dg->LoadTexture(PictureA, true, false);
954+ TextureB = -1;
955+ }
956+ else{
957+ TwoTexture = true;
958+ TextureA = d3dg->LoadTexture(PictureA, true, false);
959+ TextureB = d3dg->LoadTexture(PictureB, true, false);
960+ }
961+
962+ return 0;
963+}
964+
908965 void briefing::Render2D()
909966 {
910967 float effectA = GetEffectAlphaLoop(framecnt, 0.8f, 0.7f, true);
@@ -947,7 +1004,8 @@
9471004 d3dg->Draw2DMSFontText(230, 180, MIFdata.GetBriefingText(), d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f));
9481005 }
9491006
950-void briefing::Destroy(){
1007+void briefing::Destroy()
1008+{
9511009 //ブリーフィング画像を開放
9521010 d3dg->CleanupTexture(TextureA);
9531011 d3dg->CleanupTexture(TextureB);
@@ -1105,6 +1163,43 @@
11051163 return 0;
11061164 }
11071165
1166+int maingame::Recovery()
1167+{
1168+ char path[MAX_PATH];
1169+ char bdata[MAX_PATH]; //ダミー
1170+ char pdata[MAX_PATH]; //ダミー
1171+
1172+ //.bd1と.pd1のファイルパスを求める
1173+ if( MIFdata.GetFiletype() == false ){
1174+ GameParamInfo.GetOfficialMission(MainGameInfo.selectmission_id, NULL, NULL, path, NULL);
1175+ }
1176+ else{
1177+ MIFdata.GetDatafilePath(bdata, pdata);
1178+
1179+ strcpy(path, bdata);
1180+ for(int i=strlen(path)-1; i>0; i--){
1181+ if( path[i] == '\\' ){
1182+ path[i+1] = 0x00;
1183+ break;
1184+ }
1185+ }
1186+ }
1187+
1188+ //追加小物を読み込む
1189+ Resource.LoadAddSmallObject(MIFdata.GetAddSmallobjectModelPath(), MIFdata.GetAddSmallobjectTexturePath(), MIFdata.GetAddSmallobjectSoundPath());
1190+
1191+ //ブロックデータ初期化
1192+ d3dg->LoadMapdata(&BlockData, path);
1193+
1194+ //ポイントデータ初期化
1195+ ObjMgr.Recovery();
1196+
1197+ //背景空読み込み
1198+ Resource.LoadSkyModelTexture(MIFdata.GetSkynumber());
1199+
1200+ return 0;
1201+}
1202+
11081203 //! @brief 特定操作の入力をチェック
11091204 bool maingame::CheckInputControl(int CheckKey, int mode)
11101205 {
@@ -3111,7 +3206,12 @@
31113206 Opening->Sound();
31123207 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
31133208 if( Opening->RenderMain() == true ){
3114- ResetGame(WindowCtrl);
3209+ if( ResetGame(WindowCtrl) == 0 ){
3210+ Opening->Recovery();
3211+
3212+ //現在の画面を再スタートさせる
3213+ //GameState.PushF12Key();
3214+ }
31153215 }
31163216 }
31173217 break;
@@ -3142,7 +3242,12 @@
31423242 MainMenu->Sound();
31433243 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
31443244 if( MainMenu->RenderMain() == true ){
3145- ResetGame(WindowCtrl);
3245+ if( ResetGame(WindowCtrl) == 0 ){
3246+ MainMenu->Recovery();
3247+
3248+ //現在の画面を再スタートさせる
3249+ //GameState.PushF12Key();
3250+ }
31463251 }
31473252 }
31483253 break;
@@ -3167,7 +3272,12 @@
31673272 Briefing->Process();
31683273 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
31693274 if( Briefing->RenderMain() == true ){
3170- ResetGame(WindowCtrl);
3275+ if( ResetGame(WindowCtrl) == 0 ){
3276+ Briefing->Recovery();
3277+
3278+ //現在の画面を再スタートさせる
3279+ //GameState.PushF12Key();
3280+ }
31713281 }
31723282 }
31733283 break;
@@ -3198,7 +3308,12 @@
31983308 MainGame->Sound();
31993309 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
32003310 if( MainGame->RenderMain() == true ){
3201- ResetGame(WindowCtrl);
3311+ if( ResetGame(WindowCtrl) == 0 ){
3312+ MainGame->Recovery();
3313+
3314+ //現在の画面を再スタートさせる
3315+ //GameState.PushF12Key();
3316+ }
32023317 }
32033318 }
32043319 break;
@@ -3219,7 +3334,12 @@
32193334 Result->Process();
32203335 if( (GameConfig.GetFrameskipFlag() == false)||(framecnt%2 == 0) ){
32213336 if( Result->RenderMain() == true ){
3222- ResetGame(WindowCtrl);
3337+ if( ResetGame(WindowCtrl) == 0 ){
3338+ Result->Recovery();
3339+
3340+ //現在の画面を再スタートさせる
3341+ //GameState.PushF12Key();
3342+ }
32233343 }
32243344 }
32253345 break;
--- trunk/scene.cpp (revision 111)
+++ trunk/scene.cpp (revision 112)
@@ -61,6 +61,12 @@
6161 return 0;
6262 }
6363
64+//! @brief シーン描画回復
65+int scene::Recovery()
66+{
67+ return 0;
68+}
69+
6470 //! @brief シーン入力処理
6571 void scene::Input()
6672 {
@@ -164,6 +170,15 @@
164170 return 0;
165171 }
166172
173+//! @brief シーン描画回復
174+int D2Dscene::Recovery()
175+{
176+ //初期化
177+ gametitle = d3dg->LoadTexture("data\\title.dds", false, false);
178+ if( gametitle == -1 ){ return 1; }
179+ return 0;
180+}
181+
167182 //! @brief 2Dシーン描画処理(2D)
168183 void D2Dscene::Render2D()
169184 {
--- trunk/objectmanager.h (revision 111)
+++ trunk/objectmanager.h (revision 112)
@@ -40,6 +40,9 @@
4040 #define MAX_GRENADE 32 //!< 手榴弾の最大数
4141 #define MAX_EFFECT 256 //!< エフェクトの最大数
4242
43+#define SMALLOBJECT_SCALE 5.0f //!< 小物の表示倍率
44+#define BULLET_SCALE 1.0f //!< 銃弾の表示倍率
45+
4346 #define WEAPONSHOT_HEIGHT (VIEW_HEIGHT) //!< 弾を発射する高さ
4447
4548 #define TOTAL_WEAPON_AUTOBULLET 3 //!< 初期化時に自動的に補てんされる弾数(装弾数の何倍か)
@@ -51,7 +54,7 @@
5154 #define HUMAN_BULLETCOLLISION_LEG_H 10.0f //!< 足の当たり判定の高さ
5255 #define HUMAN_BULLETCOLLISION_LEG_R 2.5f //!< 足の当たり判定の半径
5356
54-#define SMALLOBJECT_SCALE 0.13f //!< 小物当たり判定の倍率
57+#define SMALLOBJECT_COLLISIONSCALE 0.13f //!< 小物当たり判定の倍率
5558
5659 #ifndef H_LAYERLEVEL
5760 #define H_LAYERLEVEL 3 //!< Select include file.
@@ -124,6 +127,7 @@
124127 int AddEffect(float pos_x, float pos_y, float pos_z, float move_x, float move_y, float move_z, float size, float rotation, int count, int texture, int settype);
125128 int AddMapEffect(int id, int face, float pos_x, float pos_y, float pos_z, float size, float rotation, int count, int texture);
126129 void LoadPointData();
130+ void Recovery();
127131 bool GetFriendlyFireFlag();
128132 void SetFriendlyFireFlag(bool flag);
129133 int GetPlayerID();