X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。
| Revision | 253 (tree) |
|---|---|
| Time | 2020-12-30 17:45:04 |
| Author | |
ObjectManagerのReloadWeapon()関数にて成功・失敗を返すように修正、参考資料のコメント修正。
| @@ -64,7 +64,7 @@ | ||
| 64 | 64 | |
| 65 | 65 | //! @brief 設定ファイルを読み込むクラス |
| 66 | 66 | //! @details ファイルの参照と値の管理を行います。 |
| 67 | -//! @details 参考資料:「みかん箱」http://mikan.the-ninja.jp/ ⇒ 技術資料 ⇒ config.datファイル解析資料 | |
| 67 | +//! @details 参考資料:config.datファイル解析情報 http://openxops.net/filesystem-config.php | |
| 68 | 68 | class Config |
| 69 | 69 | { |
| 70 | 70 | int Keycode[TOTAL_ControlKey]; //!< オリジナルキーコード |
| @@ -2090,14 +2090,15 @@ | ||
| 2090 | 2090 | |
| 2091 | 2091 | //! @brief 武器をリロード |
| 2092 | 2092 | //! @param human_id 対象の人番号 |
| 2093 | -void ObjectManager::ReloadWeapon(int human_id) | |
| 2093 | +//! @return 成功:true 失敗:false | |
| 2094 | +bool ObjectManager::ReloadWeapon(int human_id) | |
| 2094 | 2095 | { |
| 2095 | 2096 | //値の範囲をチェック |
| 2096 | - if( (human_id < 0)||(MAX_HUMAN <= human_id) ){ return; } | |
| 2097 | + if( (human_id < 0)||(MAX_HUMAN <= human_id) ){ return false; } | |
| 2097 | 2098 | |
| 2098 | 2099 | //無効な人ならば処理しない |
| 2099 | - if( HumanIndex[human_id].GetEnableFlag() == false ){ return; } | |
| 2100 | - if( HumanIndex[human_id].GetHP() <= 0 ){ return; } | |
| 2100 | + if( HumanIndex[human_id].GetEnableFlag() == false ){ return false; } | |
| 2101 | + if( HumanIndex[human_id].GetHP() <= 0 ){ return false; } | |
| 2101 | 2102 | |
| 2102 | 2103 | //リロードを実行 |
| 2103 | 2104 | if( HumanIndex[human_id].ReloadWeapon() == true ){ |
| @@ -2111,7 +2112,11 @@ | ||
| 2111 | 2112 | |
| 2112 | 2113 | //音源を配置 |
| 2113 | 2114 | GameSound->ReloadWeapon(x, y, z, id); |
| 2115 | + | |
| 2116 | + return true; | |
| 2114 | 2117 | } |
| 2118 | + | |
| 2119 | + return false; | |
| 2115 | 2120 | } |
| 2116 | 2121 | |
| 2117 | 2122 | //! @brief 武器を切り替える(持ち替える) |
| @@ -159,7 +159,7 @@ | ||
| 159 | 159 | void MoveWalk(int human_id); |
| 160 | 160 | void MoveJump(int human_id); |
| 161 | 161 | int ShotWeapon(int human_id); |
| 162 | - void ReloadWeapon(int human_id); | |
| 162 | + bool ReloadWeapon(int human_id); | |
| 163 | 163 | void ChangeHaveWeapon(int human_id, int id = -1); |
| 164 | 164 | int ChangeWeaponID(int human_id); |
| 165 | 165 | bool DumpWeapon(int human_id); |
| @@ -70,8 +70,7 @@ | ||
| 70 | 70 | |
| 71 | 71 | //! @brief サウンドを再生するクラス |
| 72 | 72 | //! @details サウンドの読み込みから再生までを管理します。 |
| 73 | -//! @details 内部では ezds.dll を呼び出して使用しています。 | |
| 74 | -//! @details 参考資料:「みかん箱」http://mikan.the-ninja.jp/ ⇒ 技術資料 ⇒ ezds.dllファイル解析資料 | |
| 73 | +//! @details 参考資料:ezds.dllファイル(ver:0.4)解析情報 http://openxops.net/filesystem-ezds04.php | |
| 75 | 74 | class SoundControl |
| 76 | 75 | { |
| 77 | 76 | #if SOUND_ENGINE == 0 |