X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。
リビジョン | 346 (tree) |
---|---|
日時 | 2023-01-16 00:56:52 |
作者 | ![]() |
ゲーム起動時のaddon列挙・取得処理を改良し高速化
@@ -697,8 +697,9 @@ | ||
697 | 697 | |
698 | 698 | //! @brief データファイルを読みこむ |
699 | 699 | //! @param fname ファイル名 |
700 | +//! @param addfile 追加ファイルも読み込む | |
700 | 701 | //! @return 成功:0 失敗:1 |
701 | -int MIFInterface::LoadFiledata(const char *fname) | |
702 | +int MIFInterface::LoadFiledata(const char *fname, bool addfile) | |
702 | 703 | { |
703 | 704 | if( fname == NULL ){ return 1; } |
704 | 705 |
@@ -767,7 +768,7 @@ | ||
767 | 768 | } |
768 | 769 | |
769 | 770 | //何かしらの追加小物情報ファイルが指定されていれば |
770 | - if( (strcmp(addsmallobject_path, "") != 0)&&(strcmp(addsmallobject_path, "!") != 0) ){ | |
771 | + if( (addfile == true)&&(strcmp(addsmallobject_path, "") != 0)&&(strcmp(addsmallobject_path, "!") != 0) ){ | |
771 | 772 | LoadAddSmallObjectFiledata(addsmallobject_path); |
772 | 773 | } |
773 | 774 | #ifdef ENABLE_DEBUGLOG |
@@ -1291,7 +1292,7 @@ | ||
1291 | 1292 | strcat(str, filename[i]); |
1292 | 1293 | |
1293 | 1294 | //MIFInterfaceで読み込む |
1294 | - mifdata.LoadFiledata(str); | |
1295 | + mifdata.LoadFiledata(str, false); | |
1295 | 1296 | |
1296 | 1297 | //ミッション名を取得 |
1297 | 1298 | strcpy(mission_name[i], mifdata.GetMissionName()); |
@@ -198,7 +198,7 @@ | ||
198 | 198 | public: |
199 | 199 | MIFInterface(); |
200 | 200 | ~MIFInterface(); |
201 | - int LoadFiledata(const char *fname); | |
201 | + int LoadFiledata(const char *fname, bool addfile); | |
202 | 202 | bool GetFiletype(); |
203 | 203 | char* GetMissionName(); |
204 | 204 | char* GetMissionFullname(); |
@@ -129,7 +129,7 @@ | ||
129 | 129 | GameState.SetStateMode(mode); |
130 | 130 | if( mode == 2 ){ |
131 | 131 | //mifファイルを読み込み |
132 | - if( MIFdata.LoadFiledata(MIFpath) != 0 ){ | |
132 | + if( MIFdata.LoadFiledata(MIFpath, true) != 0 ){ | |
133 | 133 | WindowCtrl->ErrorInfo("briefing data open failed"); |
134 | 134 | return 1; |
135 | 135 | } |
@@ -1631,7 +1631,7 @@ | ||
1631 | 1631 | } |
1632 | 1632 | |
1633 | 1633 | //mifファイルを読み込み |
1634 | - if( MIFdata.LoadFiledata(path) != 0 ){ | |
1634 | + if( MIFdata.LoadFiledata(path, true) != 0 ){ | |
1635 | 1635 | //briefing data open failed |
1636 | 1636 | return 1; |
1637 | 1637 | } |