X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。
リビジョン | 312 (tree) |
---|---|
日時 | 2022-05-21 15:13:29 |
作者 | xops-mikan |
オブジェクトのメイン処理関数の名称を変更、イベント処理関数の仕様変更、一部コーディングスタイルを修正
@@ -190,7 +190,8 @@ | ||
190 | 190 | |
191 | 191 | //! AIの制御モードを表す定数 |
192 | 192 | //! @warning 定数を変更する場合、必要に応じてGetBattleMode()関数の文字列出力処理も変更すること。 |
193 | -enum AImode { | |
193 | +enum AImode | |
194 | +{ | |
194 | 195 | AI_DEAD = 0, //!< 死亡している人 |
195 | 196 | AI_ACTION, //!< 戦闘中の人 |
196 | 197 | AI_CAUTION, //!< 警戒中の人 |
@@ -208,7 +209,8 @@ | ||
208 | 209 | }; |
209 | 210 | |
210 | 211 | //! AIの移動モードを表す定数 |
211 | -enum AIMoveNaviFlag { | |
212 | +enum AIMoveNaviFlag | |
213 | +{ | |
212 | 214 | AI_NAVI_MOVE_NULL, |
213 | 215 | AI_NAVI_MOVE_WALK, |
214 | 216 | AI_NAVI_MOVE_RUN, |
@@ -223,7 +225,8 @@ | ||
223 | 225 | }; |
224 | 226 | |
225 | 227 | //! AIの操作モードを表す定数 |
226 | -enum AIcontrolFlag { | |
228 | +enum AIcontrolFlag | |
229 | +{ | |
227 | 230 | AI_CTRL_MOVEFORWARD = 0x0001, |
228 | 231 | AI_CTRL_MOVEBACKWARD = 0x0002, |
229 | 232 | AI_CTRL_MOVELEFT = 0x0004, |
@@ -42,7 +42,8 @@ | ||
42 | 42 | #include <float.h> |
43 | 43 | |
44 | 44 | //! 当たり判定用ブロックデータ構造体 |
45 | -struct Coll_Blockdata{ | |
45 | +struct Coll_Blockdata | |
46 | +{ | |
46 | 47 | float x[8]; //!< ブロック X座標 |
47 | 48 | float y[8]; //!< ブロック Y座標 |
48 | 49 | float z[8]; //!< ブロック Z座標 |
@@ -507,6 +507,7 @@ | ||
507 | 507 | return out; |
508 | 508 | } |
509 | 509 | |
510 | + | |
510 | 511 | //! @brief 追加設定ファイルを生成する |
511 | 512 | //! @param fname ファイル名 |
512 | 513 | //! @return 成功:true 失敗/不要:false |
@@ -641,7 +642,6 @@ | ||
641 | 642 | return 0; |
642 | 643 | } |
643 | 644 | |
644 | - | |
645 | 645 | //! @brief 追加設定値をデフォルトの値で初期化 |
646 | 646 | void Config::SetDefaultExtConfig() |
647 | 647 | { |
@@ -41,7 +41,8 @@ | ||
41 | 41 | #include "main.h" |
42 | 42 | |
43 | 43 | //! GetKeycode()用 定数 |
44 | -enum ControlKey { | |
44 | +enum ControlKey | |
45 | +{ | |
45 | 46 | KEY_TURNUP = 0, |
46 | 47 | KEY_TURNDOWN, |
47 | 48 | KEY_TURNLEFT, |
@@ -56,7 +56,8 @@ | ||
56 | 56 | #include <ctype.h> |
57 | 57 | |
58 | 58 | //! ブロックデータ用構造体 (blockdata構造体で使用) |
59 | -struct b_material{ | |
59 | +struct b_material | |
60 | +{ | |
60 | 61 | int textureID; //!< textureID |
61 | 62 | float u[4]; //!< textureUV-U |
62 | 63 | float v[4]; //!< textureUV-V |
@@ -69,7 +70,8 @@ | ||
69 | 70 | float shadow; //!< shadow |
70 | 71 | }; |
71 | 72 | //! ブロックデータ用構造体 |
72 | -struct blockdata{ | |
73 | +struct blockdata | |
74 | +{ | |
73 | 75 | int id; //!< DataID |
74 | 76 | float x[8]; //!< Position |
75 | 77 | float y[8]; //!< Position |
@@ -78,7 +80,8 @@ | ||
78 | 80 | }; |
79 | 81 | |
80 | 82 | //! ポイントデータ用構造体 |
81 | -struct pointdata{ | |
83 | +struct pointdata | |
84 | +{ | |
82 | 85 | int id; //!< DataID |
83 | 86 | float x; //!< Position |
84 | 87 | float y; //!< Position |
@@ -91,7 +94,8 @@ | ||
91 | 94 | }; |
92 | 95 | |
93 | 96 | //! 追加小物用の構造体 |
94 | -struct addsmallobject{ | |
97 | +struct addsmallobject | |
98 | +{ | |
95 | 99 | char modelpath[_MAX_PATH]; //!< モデルデータパス |
96 | 100 | char texturepath[_MAX_PATH]; //!< テクスチャパス |
97 | 101 | int decide; //!< 当たり判定の大きさ |
@@ -57,7 +57,8 @@ | ||
57 | 57 | }; |
58 | 58 | |
59 | 59 | //! ログの出力モードを表す定数 |
60 | -enum LogTag { | |
60 | +enum LogTag | |
61 | +{ | |
61 | 62 | LOG_CHECK, |
62 | 63 | LOG_INIT, |
63 | 64 | LOG_LOAD, |
@@ -253,19 +253,13 @@ | ||
253 | 253 | |
254 | 254 | //! @brief 処理を実行 |
255 | 255 | //! @param SkipFlag イベントタスクのスキップフラグ |
256 | -//! @param endcnt 終了カウントのポインタ | |
257 | -//! @param complete ミッション成功フラグのポインタ | |
258 | -//! @param MessageID イベントメッセージ番号のポインタ | |
259 | -//! @param SetMessageID イベントメッセージ読み出しフラグ | |
256 | +//! @param Param イベントのパラメーターを受け渡しする構造体のポインタ | |
260 | 257 | //! @return 実行したステップ数 |
261 | -//! @attention 渡された引数に変更がない場合、渡された引数のデータは操作されません。 | |
262 | -//! @attention SetMessageID は、メッセージイベントが実行された場合に true になります。<b>前回から変更されたとは限りません。</b> | |
263 | -int EventControl::Execution(bool SkipFlag, int *endcnt, bool *complete, int *MessageID, bool *SetMessageID) | |
258 | +//! @attention 渡されたパラメーター(構造体)に変更がない場合、渡されたパラメーターは操作されません。 | |
259 | +//! @attention 構造体のSetMessageID は、メッセージイベントが実行された場合に true になります。<b>前回から変更されたとは限りません。</b> | |
260 | +int EventControl::ProcessEventPoint(bool SkipFlag, EventParameter *Param) | |
264 | 261 | { |
265 | - if( endcnt == NULL ){ return 0; } | |
266 | - if( complete == NULL ){ return 0; } | |
267 | - if( MessageID == NULL ){ return 0; } | |
268 | - if( SetMessageID == NULL ){ return 0; } | |
262 | + if( Param == NULL ){ return 0; } | |
269 | 263 | |
270 | 264 | pointdata data; |
271 | 265 | int cnt = 0; |
@@ -293,13 +287,13 @@ | ||
293 | 287 | |
294 | 288 | switch(data.p1){ |
295 | 289 | case 10: //任務達成 |
296 | - *endcnt += 1; | |
297 | - *complete = true; | |
290 | + Param->endcnt += 1; | |
291 | + Param->complete = true; | |
298 | 292 | return cnt; |
299 | 293 | |
300 | 294 | case 11: //任務失敗 |
301 | - *endcnt += 1; | |
302 | - *complete = false; | |
295 | + Param->endcnt += 1; | |
296 | + Param->complete = false; | |
303 | 297 | return cnt; |
304 | 298 | |
305 | 299 | case 12: //死亡待ち |
@@ -334,7 +328,7 @@ | ||
334 | 328 | break; |
335 | 329 | |
336 | 330 | case 18: //メッセージ |
337 | - SetMessage((unsigned char)data.p2, MessageID, SetMessageID); | |
331 | + SetMessage((unsigned char)data.p2, &(Param->MessageID), &(Param->SetMessageID)); | |
338 | 332 | nextp4 = data.p3; |
339 | 333 | break; |
340 | 334 |
@@ -40,6 +40,15 @@ | ||
40 | 40 | #endif |
41 | 41 | #include "main.h" |
42 | 42 | |
43 | +//! イベントパラメーター用の構造体 | |
44 | +struct EventParameter | |
45 | +{ | |
46 | + int endcnt; //!< endcnt 終了カウントのポインタ | |
47 | + bool complete; //!< complete ミッション成功フラグのポインタ | |
48 | + int MessageID; //!< MessageID イベントメッセージ番号のポインタ | |
49 | + bool SetMessageID; //!< SetMessageID イベントメッセージ読み出しフラグ | |
50 | +}; | |
51 | + | |
43 | 52 | //! @brief イベントを処理するクラス |
44 | 53 | //! @details ミッションのイベントポイントを処理します。 |
45 | 54 | //! @details このクラスは1つのイベント処理(流れ)に専念します。複数のイベントを並列に処理させる場合は、このクラスのオブジェクトを複数呼び出す必要があります。(例えば3つ同時に処理させる場合、このクラスのオブジェクトを3つ作成してください。) |
@@ -65,7 +74,7 @@ | ||
65 | 74 | void SetClass(PointDataInterface *in_Point, ObjectManager *in_ObjMgr); |
66 | 75 | void Reset(signed char EntryP4); |
67 | 76 | signed char GetNextP4(); |
68 | - int Execution(bool SkipFlag, int *endcnt, bool *complete, int *MessageID, bool *SetMessageID); | |
77 | + int ProcessEventPoint(bool SkipFlag, EventParameter *Param); | |
69 | 78 | }; |
70 | 79 | |
71 | 80 | #endif |
\ No newline at end of file |
@@ -2559,24 +2559,37 @@ | ||
2559 | 2559 | //----------------------------------- |
2560 | 2560 | |
2561 | 2561 | time = GetTimeMS(); |
2562 | - bool SetMessageID; | |
2563 | 2562 | if( EventStop == false ){ |
2564 | 2563 | //イベント実行 |
2565 | 2564 | for(int i=0; i<TOTAL_EVENTLINE; i++){ |
2566 | 2565 | if( end_framecnt == 0 ){ |
2567 | - SetMessageID = false; | |
2568 | - Event[i].Execution(EventSkip[i], &end_framecnt, &MainGameInfo.missioncomplete, &message_id, &SetMessageID); | |
2566 | + EventParameter EventParam; | |
2569 | 2567 | |
2568 | + //イベントの実行状況を構造体に格納 | |
2569 | + EventParam.endcnt = end_framecnt; | |
2570 | + EventParam.complete = MainGameInfo.missioncomplete; | |
2571 | + EventParam.MessageID = message_id; | |
2572 | + EventParam.SetMessageID = false; | |
2573 | + | |
2574 | + //イベントポイントを実行 | |
2575 | + Event[i].ProcessEventPoint(EventSkip[i], &EventParam); | |
2576 | + | |
2577 | + //構造体から各変数に戻す | |
2578 | + end_framecnt = EventParam.endcnt; | |
2579 | + MainGameInfo.missioncomplete = EventParam.complete; | |
2580 | + message_id = EventParam.SetMessageID; | |
2581 | + | |
2570 | 2582 | //イベントスキップフラグを戻す |
2571 | 2583 | EventSkip[i] = false; |
2572 | 2584 | |
2573 | 2585 | //イベントメッセージが再セットされていたら、カウントを戻す。 |
2574 | - if( SetMessageID == true ){ | |
2586 | + if( EventParam.SetMessageID == true ){ | |
2575 | 2587 | message_cnt = 0; |
2576 | 2588 | } |
2577 | 2589 | } |
2578 | 2590 | } |
2579 | 2591 | } |
2592 | + | |
2580 | 2593 | if( (message_id != -1)&&(message_cnt < (int)(TOTAL_EVENTENT_SHOWMESSEC*GAMEFPS)) ){ |
2581 | 2594 | message_cnt += 1; |
2582 | 2595 | } |
@@ -101,7 +101,8 @@ | ||
101 | 101 | void CleanupGame(); |
102 | 102 | |
103 | 103 | //! ゲームの状態を受け渡しする構造体 |
104 | -struct GameInfo{ | |
104 | +struct GameInfo | |
105 | +{ | |
105 | 106 | int selectmission_id; //!< 選択されたミッション |
106 | 107 | char mifpath[MAX_PATH]; //!< MIFファイルのパス |
107 | 108 | bool missioncomplete; //!< ミッション完了 |
@@ -114,7 +115,8 @@ | ||
114 | 115 | |
115 | 116 | #ifdef ENABLE_MENUOPTIONS |
116 | 117 | //! メニューリンクテキスト構造体 |
117 | -struct MenuLinkTextData{ | |
118 | +struct MenuLinkTextData | |
119 | +{ | |
118 | 120 | bool enable; //!< リンクテキストとしての有効化フラグ |
119 | 121 | int pos_x; //!< X座標 |
120 | 122 | int pos_y; //!< Y座標 |
@@ -128,7 +130,8 @@ | ||
128 | 130 | |
129 | 131 | #ifdef ENABLE_DEBUGCONSOLE |
130 | 132 | //! コンソールを管理する構造体 |
131 | -struct ConsoleData{ | |
133 | +struct ConsoleData | |
134 | +{ | |
132 | 135 | int color; //!< 色 |
133 | 136 | char textdata[MAX_CONSOLELEN+1]; //!< 文字列 |
134 | 137 | }; |
@@ -139,7 +139,7 @@ | ||
139 | 139 | } |
140 | 140 | |
141 | 141 | //! @brief 計算を実行(自由落下など) |
142 | -int object::RunFrame() | |
142 | +int object::ProcessObject() | |
143 | 143 | { |
144 | 144 | return 0; |
145 | 145 | } |
@@ -1859,7 +1859,7 @@ | ||
1859 | 1859 | //! @param underblock_face 足元のブロックの面番号を受け取るポインタ(NULL可) |
1860 | 1860 | //! @attention 空中の場合など足元にブロックがない場合、ブロックIDと面番号は -1 を返します。 |
1861 | 1861 | //! @return 処理なし:0 通常処理:1 死亡して倒れ終わった直後:2 静止した死体:3 地形により死亡した直後:4 |
1862 | -int human::RunFrame(class Collision *CollD, class BlockDataInterface *inblockdata, bool AddCollisionFlag, bool player, bool F5mode, int *underblock_id, int *underblock_face) | |
1862 | +int human::ProcessObject(class Collision *CollD, class BlockDataInterface *inblockdata, bool AddCollisionFlag, bool player, bool F5mode, int *underblock_id, int *underblock_face) | |
1863 | 1863 | { |
1864 | 1864 | if( CollD == NULL ){ return 0; } |
1865 | 1865 | if( inblockdata == NULL ){ return 0; } |
@@ -1962,7 +1962,7 @@ | ||
1962 | 1962 | } |
1963 | 1963 | |
1964 | 1964 | //モーション計算 |
1965 | - MotionCtrl->RunFrame(rotation_x, armrotation_y, weapon_paramid, WeaponReloadMotionCnt, WeaponChangeWeaponIDCnt, MoveFlag_lt, hp, player); | |
1965 | + MotionCtrl->ProcessObject(rotation_x, armrotation_y, weapon_paramid, WeaponReloadMotionCnt, WeaponChangeWeaponIDCnt, MoveFlag_lt, hp, player); | |
1966 | 1966 | |
1967 | 1967 | if( CheckDead != 0 ){ return 3; } |
1968 | 1968 | return 1; |
@@ -2304,7 +2304,7 @@ | ||
2304 | 2304 | |
2305 | 2305 | //! @brief 計算を実行(自由落下) |
2306 | 2306 | //! @param CollD Collisionのポインタ |
2307 | -int weapon::RunFrame(class Collision *CollD) | |
2307 | +int weapon::ProcessObject(class Collision *CollD) | |
2308 | 2308 | { |
2309 | 2309 | //クラスが設定されていなければ失敗 |
2310 | 2310 | if( CollD == NULL ){ return 0; } |
@@ -2569,7 +2569,7 @@ | ||
2569 | 2569 | } |
2570 | 2570 | |
2571 | 2571 | //! @brief 計算を実行(破壊時の移動など) |
2572 | -int smallobject::RunFrame() | |
2572 | +int smallobject::ProcessObject() | |
2573 | 2573 | { |
2574 | 2574 | //描画されていないか、体力が残っていなければ処理しない。 |
2575 | 2575 | if( EnableFlag == false ){ return 0; } |
@@ -2717,7 +2717,7 @@ | ||
2717 | 2717 | } |
2718 | 2718 | |
2719 | 2719 | //! @brief 計算を実行(弾の進行・時間消滅) |
2720 | -int bullet::RunFrame() | |
2720 | +int bullet::ProcessObject() | |
2721 | 2721 | { |
2722 | 2722 | //初期化されていなければ処理しない |
2723 | 2723 | if( EnableFlag == false ){ return 0; } |
@@ -2819,7 +2819,7 @@ | ||
2819 | 2819 | |
2820 | 2820 | //! @brief 計算を実行(手榴弾の進行・爆発) |
2821 | 2821 | //! @return 爆発:2 バウンド・跳ね返り:1 それ以外:0 |
2822 | -int grenade::RunFrame(class Collision *CollD) | |
2822 | +int grenade::ProcessObject(class Collision *CollD) | |
2823 | 2823 | { |
2824 | 2824 | if( CollD == NULL ){ return 0; } |
2825 | 2825 |
@@ -3024,7 +3024,7 @@ | ||
3024 | 3024 | |
3025 | 3025 | //! @brief 計算を実行(エフェクト移動・時間消滅) |
3026 | 3026 | //! @return 処理実行:1 描画最終フレーム:2 処理なし:0 |
3027 | -int effect::RunFrame() | |
3027 | +int effect::ProcessObject() | |
3028 | 3028 | { |
3029 | 3029 | //初期化されていなければ処理しない |
3030 | 3030 | if( EnableFlag == false ){ return 0; } |
@@ -3250,7 +3250,7 @@ | ||
3250 | 3250 | //! @attention MoveFlag 移動方向を表すフラグ |
3251 | 3251 | //! @attention hp 体力 |
3252 | 3252 | //! @attention PlayerFlag プレイヤーかどうか |
3253 | -void HumanMotionControl::RunFrame(float rotation_x, float armrotation_y, int weapon_paramid, int ReloadCnt, int ChangeWeaponIDCnt, int MoveFlag, int hp, bool PlayerFlag) | |
3253 | +void HumanMotionControl::ProcessObject(float rotation_x, float armrotation_y, int weapon_paramid, int ReloadCnt, int ChangeWeaponIDCnt, int MoveFlag, int hp, bool PlayerFlag) | |
3254 | 3254 | { |
3255 | 3255 | int ArmModelID; |
3256 | 3256 | float move_rx; |
@@ -127,7 +127,7 @@ | ||
127 | 127 | virtual void SetTexture(int id); |
128 | 128 | virtual int GetTexture(); |
129 | 129 | virtual void SetDarkModelFlag(bool flag); |
130 | - virtual int RunFrame(); | |
130 | + virtual int ProcessObject(); | |
131 | 131 | virtual void Render(class D3DGraphics *d3dg, bool NoModel); |
132 | 132 | }; |
133 | 133 |
@@ -233,7 +233,7 @@ | ||
233 | 233 | virtual bool CheckHit(float *rx); |
234 | 234 | virtual float GetTotalMove(); |
235 | 235 | virtual int GetMoveMotionCount(); |
236 | - virtual int RunFrame(class Collision *CollD, class BlockDataInterface *inblockdata, bool AddCollisionFlag, bool player, bool F5mode, int *underblock_id, int *underblock_face); | |
236 | + virtual int ProcessObject(class Collision *CollD, class BlockDataInterface *inblockdata, bool AddCollisionFlag, bool player, bool F5mode, int *underblock_id, int *underblock_face); | |
237 | 237 | virtual int GetGunsightErrorRange(); |
238 | 238 | virtual void Render(class D3DGraphics *d3dg, class ResourceManager *Resource, bool DrawArmOnly, bool player, bool NoModel); |
239 | 239 | }; |
@@ -263,7 +263,7 @@ | ||
263 | 263 | virtual int StartReload(); |
264 | 264 | virtual int RunReload(); |
265 | 265 | virtual bool ResetWeaponParam(class ResourceManager *Resource, int id_param, int lnbs, int nbs); |
266 | - virtual int RunFrame(class Collision *CollD); | |
266 | + virtual int ProcessObject(class Collision *CollD); | |
267 | 267 | virtual void Render(class D3DGraphics *d3dg, bool NoModel); |
268 | 268 | }; |
269 | 269 |
@@ -292,7 +292,7 @@ | ||
292 | 292 | virtual void HitBullet(int attacks); |
293 | 293 | virtual void HitGrenadeExplosion(int attacks); |
294 | 294 | virtual void Destruction(); |
295 | - virtual int RunFrame(); | |
295 | + virtual int ProcessObject(); | |
296 | 296 | virtual void Render(D3DGraphics *d3dg, bool NoModel); |
297 | 297 | }; |
298 | 298 |
@@ -316,7 +316,7 @@ | ||
316 | 316 | virtual void SetParamData(int _attacks, int _penetration, int _speed, int _teamid, int _humanid, float _ontargetcnt, bool init); |
317 | 317 | virtual void GetPosData(float *x, float *y, float *z, float *rx, float *ry); |
318 | 318 | virtual void GetParamData(int *_attacks, int *_penetration, int *_speed, int *_teamid, int *_humanid, float *_ontargetcnt); |
319 | - virtual int RunFrame(); | |
319 | + virtual int ProcessObject(); | |
320 | 320 | virtual void Render(class D3DGraphics *d3dg, bool NoModel); |
321 | 321 | }; |
322 | 322 |
@@ -333,7 +333,7 @@ | ||
333 | 333 | void SetParamData(float speed, int _teamid, int _humanid, float _ontargetcnt, bool init); |
334 | 334 | void GetParamData(float *_speed, int *_teamid, int *_humanid, float *_ontargetcnt); |
335 | 335 | float GetSpeed(); |
336 | - int RunFrame(class Collision *CollD); | |
336 | + int ProcessObject(class Collision *CollD); | |
337 | 337 | virtual void Render(D3DGraphics *d3dg, bool NoModel); |
338 | 338 | }; |
339 | 339 |
@@ -365,7 +365,7 @@ | ||
365 | 365 | virtual int GetTextureID(); |
366 | 366 | virtual void GetMove(float *mx, float *my, float *mz); |
367 | 367 | virtual bool GetCollideMapFlag(); |
368 | - virtual int RunFrame(); | |
368 | + virtual int ProcessObject(); | |
369 | 369 | virtual void Render(class D3DGraphics *d3dg, float camera_rx, float camera_ry, bool NoModel); |
370 | 370 | }; |
371 | 371 |
@@ -402,13 +402,14 @@ | ||
402 | 402 | void ReloadWeapon(int weapon_paramid); |
403 | 403 | void DumpWeapon(); |
404 | 404 | void Jump(); |
405 | - void RunFrame(float rotation_x, float armrotation_y, int weapon_paramid, int ReloadCnt, int ChangeWeaponIDCnt, int MoveFlag, int hp, bool PlayerFlag); | |
405 | + void ProcessObject(float rotation_x, float armrotation_y, int weapon_paramid, int ReloadCnt, int ChangeWeaponIDCnt, int MoveFlag, int hp, bool PlayerFlag); | |
406 | 406 | void GetRenderMotion(float *arm_rotation_y, float *leg_rotation_x, int *upmodel, int *armmodel, int *legmodel); |
407 | 407 | int GetMoveMotionCnt(); |
408 | 408 | }; |
409 | 409 | |
410 | 410 | //! 人の足の状態を示す定数 |
411 | -enum Human_LegState { | |
411 | +enum Human_LegState | |
412 | +{ | |
412 | 413 | LEG_STOP = 0, |
413 | 414 | LEG_WALK, |
414 | 415 | LEG_RUN |
@@ -415,7 +416,8 @@ | ||
415 | 416 | }; |
416 | 417 | |
417 | 418 | //! 人の移動操作を表すフラグ |
418 | -enum Human_MoveFlag { | |
419 | +enum Human_MoveFlag | |
420 | +{ | |
419 | 421 | MOVEFLAG_FORWARD = 0x01, |
420 | 422 | MOVEFLAG_BACK = 0x02, |
421 | 423 | MOVEFLAG_LEFT = 0x04, |
@@ -425,7 +427,8 @@ | ||
425 | 427 | }; |
426 | 428 | |
427 | 429 | //! エフェクトの種類を表す定数 |
428 | -enum Effect_Type { | |
430 | +enum Effect_Type | |
431 | +{ | |
429 | 432 | EFFECT_NORMAL = 0x00, //!< ノーマル |
430 | 433 | EFFECT_NOBILLBOARD = 0x01, //!< ビルボード化しない |
431 | 434 | EFFECT_COLLIDEMAP = 0x02 //!< マップとの当たり判定 |
@@ -2685,7 +2685,7 @@ | ||
2685 | 2685 | cmdF5 = false; |
2686 | 2686 | } |
2687 | 2687 | |
2688 | - rtn = HumanIndex[i].RunFrame(CollD, BlockData, AddCollisionFlag, player, cmdF5, &block_id, &block_face); | |
2688 | + rtn = HumanIndex[i].ProcessObject(CollD, BlockData, AddCollisionFlag, player, cmdF5, &block_id, &block_face); | |
2689 | 2689 | if( rtn == 2 ){ |
2690 | 2690 | //死亡時のエフェクト |
2691 | 2691 | DeadEffect(&(HumanIndex[i])); |
@@ -2750,13 +2750,13 @@ | ||
2750 | 2750 | |
2751 | 2751 | //武器オブジェクトの処理 |
2752 | 2752 | for(int i=0; i<MAX_WEAPON; i++){ |
2753 | - WeaponIndex[i].RunFrame(CollD); | |
2753 | + WeaponIndex[i].ProcessObject(CollD); | |
2754 | 2754 | WeaponIndex[i].SetDarkModelFlag(screen); |
2755 | 2755 | } |
2756 | 2756 | |
2757 | 2757 | //小物オブジェクトの処理 |
2758 | 2758 | for(int i=0; i<MAX_SMALLOBJECT; i++){ |
2759 | - SmallObjectIndex[i].RunFrame(); | |
2759 | + SmallObjectIndex[i].ProcessObject(); | |
2760 | 2760 | SmallObjectIndex[i].SetDarkModelFlag(screen); |
2761 | 2761 | } |
2762 | 2762 |
@@ -2768,7 +2768,7 @@ | ||
2768 | 2768 | float mx, my, mz; |
2769 | 2769 | |
2770 | 2770 | CollideBullet(&BulletIndex[i]); //当たり判定を実行 |
2771 | - BulletIndex[i].RunFrame(); //主計算 | |
2771 | + BulletIndex[i].ProcessObject(); //主計算 | |
2772 | 2772 | BulletIndex[i].SetDarkModelFlag(screen); |
2773 | 2773 | |
2774 | 2774 | if( BulletIndex[i].GetEnableFlag() == true ){ |
@@ -2808,7 +2808,7 @@ | ||
2808 | 2808 | EffectIndex[i].SetEnableFlag(false); |
2809 | 2809 | } |
2810 | 2810 | else{ |
2811 | - EffectIndex[i].RunFrame(); | |
2811 | + EffectIndex[i].ProcessObject(); | |
2812 | 2812 | EffectIndex[i].SetDarkModelFlag(screen); |
2813 | 2813 | } |
2814 | 2814 | } |
@@ -2819,7 +2819,7 @@ | ||
2819 | 2819 | float speed = GrenadeIndex[i].GetSpeed(); |
2820 | 2820 | |
2821 | 2821 | //主計算 |
2822 | - int rcr = GrenadeIndex[i].RunFrame(CollD); | |
2822 | + int rcr = GrenadeIndex[i].ProcessObject(CollD); | |
2823 | 2823 | GrenadeIndex[i].SetDarkModelFlag(screen); |
2824 | 2824 | |
2825 | 2825 | //バウンド・跳ね返ったならば |
@@ -69,7 +69,8 @@ | ||
69 | 69 | #include "main.h" |
70 | 70 | |
71 | 71 | //! エフェクト描画計算用構造体 |
72 | -struct effectdata{ | |
72 | +struct effectdata | |
73 | +{ | |
73 | 74 | int id; //!< データ番号 |
74 | 75 | float dist; //!< 距離 |
75 | 76 | }; |
@@ -57,7 +57,8 @@ | ||
57 | 57 | #include "main.h" |
58 | 58 | |
59 | 59 | //! 人設定用の構造体 |
60 | -struct HumanParameter{ | |
60 | +struct HumanParameter | |
61 | +{ | |
61 | 62 | int texture; //!< テクスチャ番号 |
62 | 63 | int model; //!< モデル番号 |
63 | 64 | int hp; //!< 体力 |
@@ -67,7 +68,8 @@ | ||
67 | 68 | }; |
68 | 69 | |
69 | 70 | //! 武器設定用の構造体 |
70 | -struct WeaponParameter{ | |
71 | +struct WeaponParameter | |
72 | +{ | |
71 | 73 | const char *name; //!< 武器名 |
72 | 74 | const char *model; //!< モデルファイル名 |
73 | 75 | const char *texture; //!< テクスチャファイル名 |
@@ -104,7 +106,8 @@ | ||
104 | 106 | }; |
105 | 107 | |
106 | 108 | //! 小物設定用の構造体 |
107 | -struct SmallObjectParameter{ | |
109 | +struct SmallObjectParameter | |
110 | +{ | |
108 | 111 | const char *model; //!< モデル名 |
109 | 112 | const char *texture; //!< テクスチャ名 |
110 | 113 | int decide; //!< 当たり判定の大きさ |
@@ -114,7 +117,8 @@ | ||
114 | 117 | }; |
115 | 118 | |
116 | 119 | //! 銃弾オブジェクト用の構造体 |
117 | -struct BulletParameter{ | |
120 | +struct BulletParameter | |
121 | +{ | |
118 | 122 | const char *model; //!< モデル名 |
119 | 123 | const char *texture; //!< テクスチャ名 |
120 | 124 | float size; //!< 描画倍率 |
@@ -121,7 +125,8 @@ | ||
121 | 125 | }; |
122 | 126 | |
123 | 127 | //! 標準ミッション設定用の構造体 |
124 | -struct OfficialMissionParameter{ | |
128 | +struct OfficialMissionParameter | |
129 | +{ | |
125 | 130 | const char *name; //!< ミッション識別名 |
126 | 131 | const char *fullname; //!< ミッション正式名称 |
127 | 132 | const char *directory; //!< データディレクトリ |
@@ -131,7 +136,8 @@ | ||
131 | 136 | }; |
132 | 137 | |
133 | 138 | //! AIレベルによる設定(性能値)用構造体 |
134 | -struct AIParameter{ | |
139 | +struct AIParameter | |
140 | +{ | |
135 | 141 | int aiming; //!< エイミング能力 |
136 | 142 | int attack; //!< 攻撃性 |
137 | 143 | int search; //!< 発見能力 |
@@ -47,7 +47,8 @@ | ||
47 | 47 | #include "main.h" |
48 | 48 | |
49 | 49 | //! サウンドリスト「paramid」用定数 |
50 | -enum SoundmgrID { | |
50 | +enum SoundmgrID | |
51 | +{ | |
51 | 52 | SHOT_WEAPON = 0, //!< 発砲音 |
52 | 53 | SHOT_WEAPON_PLAYER, //!< プレイヤー自身の発砲音 |
53 | 54 | HIT_MAP, //!< マップ着弾音 |
@@ -69,7 +70,8 @@ | ||
69 | 70 | }; |
70 | 71 | |
71 | 72 | //! サウンドリスト用構造体 |
72 | -struct soundlist{ | |
73 | +struct soundlist | |
74 | +{ | |
73 | 75 | int paramid; //!< 音源の種類番号・SoundmgrID定数 |
74 | 76 | int dataid; //!< データ番号 |
75 | 77 | float x; //!< X座標 |
@@ -38,7 +38,8 @@ | ||
38 | 38 | #include "main.h" |
39 | 39 | |
40 | 40 | //! 状態を表す定数 |
41 | -enum State { | |
41 | +enum State | |
42 | +{ | |
42 | 43 | STATE_NULL = 0, //!< [エラー]無効な状態 |
43 | 44 | STATE_CREATE_OPENING, //!< オープニング画面 初期化・準備 |
44 | 45 | STATE_NOW_OPENING, //!< オープニング画面 実行中 |