• 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

Revision338 (tree)
Time2022-11-20 18:10:29
Authorxops-mikan

Log Message

ポイントパラメーターの種類の値を一部定数化

Change Summary

Incremental Difference

--- trunk/ai.cpp (revision 337)
+++ trunk/ai.cpp (revision 338)
@@ -1596,7 +1596,7 @@
15961596 //警戒待ちパスなら次へ進める
15971597 pointdata pdata;
15981598 MoveNavi->GetPathPointData(&pdata);
1599- if( (pdata.p1 == 3)&&(pdata.p2 == 4) ){
1599+ if( (pdata.p1 == POINT_P1TYPE_AIPATH)&&(pdata.p2 == 4) ){
16001600 MoveNavi->MovePathNextState();
16011601 MoveNavi->MovePathNowState();
16021602 }
@@ -2012,7 +2012,7 @@
20122012 }
20132013
20142014 //移動パスなら〜
2015- if( pdata.p1 == 3 ){
2015+ if( pdata.p1 == POINT_P1TYPE_AIPATH ){
20162016 //移動ステート設定
20172017 switch(pdata.p2){
20182018 case 0: movemode = AI_WALK; break;
@@ -2059,7 +2059,7 @@
20592059 }
20602060
20612061 //ランダムパスなら
2062- if( pdata.p1 == 8 ){
2062+ if( pdata.p1 == POINT_P1TYPE_RAND_AIPATH ){
20632063 movemode = AI_RANDOM;
20642064 return false;
20652065 }
@@ -2082,7 +2082,7 @@
20822082 signed short int nextpointp4 = pdata.p3;
20832083
20842084 //ランダムパス処理
2085- if( pdata.p1 == 8 ){
2085+ if( pdata.p1 == POINT_P1TYPE_RAND_AIPATH ){
20862086 if( GetRand(2) == 0 ){
20872087 nextpointp4 = pdata.p2;
20882088 }
--- trunk/datafile.h (revision 337)
+++ trunk/datafile.h (revision 338)
@@ -95,6 +95,16 @@
9595 signed short int p4; //!< Param
9696 } pointdata;
9797
98+//ポイントデータのP1の種類番号
99+#define POINT_P1TYPE_HUMAN 1 //!< Param1 type
100+#define POINT_P1TYPE_WEAPON 2 //!< Param1 type
101+#define POINT_P1TYPE_AIPATH 3 //!< Param1 type
102+#define POINT_P1TYPE_HUMANINFO 4 //!< Param1 type
103+#define POINT_P1TYPE_SMALLOBJ 5 //!< Param1 type
104+#define POINT_P1TYPE_HUMAN2 6 //!< Param1 type
105+#define POINT_P1TYPE_RAND_WEAPON 7 //!< Param1 type
106+#define POINT_P1TYPE_RAND_AIPATH 8 //!< Param1 type
107+
98108 //! 追加小物用の構造体
99109 typedef struct
100110 {
--- trunk/event.cpp (revision 337)
+++ trunk/event.cpp (revision 338)
@@ -176,7 +176,7 @@
176176
177177 //対象がAIパスならば、強制的にパラメータを書き換える
178178 Point->Getdata(&pathdata, pid);
179- if( (pathdata.p1 == 3)||(pathdata.p1 == 8) ){
179+ if( (pathdata.p1 == POINT_P1TYPE_AIPATH)||(pathdata.p1 == POINT_P1TYPE_RAND_AIPATH) ){
180180 pathdata.p2 = (signed short int)newmode;
181181 Point->SetParam(pid, pathdata.p1, pathdata.p2, pathdata.p3, pathdata.p4);
182182 return true;
--- trunk/gamemain.cpp (revision 337)
+++ trunk/gamemain.cpp (revision 338)
@@ -4002,11 +4002,11 @@
40024002 for(int i=0; i<TotalPoints; i++){
40034003 if( PointData.Getdata(&pdata, i) != 0 ){ continue; }
40044004
4005- if( (pdata.p1 == 1)||(pdata.p1 == 6) ){ HumanPoints += 1; }
4006- if( (pdata.p1 == 2)||(pdata.p1 == 7) ){ WeaponPoints += 1; }
4007- if( pdata.p1 == 5 ){ OjectPoints += 1; }
4008- if( pdata.p1 == 4 ){ HumaninfoPoints += 1; }
4009- if( (pdata.p1 == 3)||(pdata.p1 == 8) ){ PathPoints += 1; }
4005+ if( (pdata.p1 == POINT_P1TYPE_HUMAN)||(pdata.p1 == POINT_P1TYPE_HUMAN2) ){ HumanPoints += 1; }
4006+ if( (pdata.p1 == POINT_P1TYPE_WEAPON)||(pdata.p1 == POINT_P1TYPE_RAND_WEAPON) ){ WeaponPoints += 1; }
4007+ if( pdata.p1 == POINT_P1TYPE_SMALLOBJ ){ OjectPoints += 1; }
4008+ if( pdata.p1 == POINT_P1TYPE_HUMANINFO ){ HumaninfoPoints += 1; }
4009+ if( (pdata.p1 == POINT_P1TYPE_AIPATH)||(pdata.p1 == POINT_P1TYPE_RAND_AIPATH) ){ PathPoints += 1; }
40104010 if( (10 <= pdata.p1)&&(pdata.p1 <= 19) ){ EventPoints += 1; }
40114011 }
40124012 sprintf(str, "HumanPoints : %-3d WeaponPoints : %-3d SmallOjectPoints : %-3d", HumanPoints, WeaponPoints, OjectPoints);
--- trunk/objectmanager.cpp (revision 337)
+++ trunk/objectmanager.cpp (revision 338)
@@ -232,7 +232,7 @@
232232 //成功すれば配列に記録
233233 Weapon[0] = &WeaponIndex[Weaponindexid];
234234 }
235- if( data.p1 == 1 ){
235+ if( data.p1 == POINT_P1TYPE_HUMAN ){
236236 //武器Aの仮想武器として追加
237237 Weaponindexid = AddVisualWeaponIndex(HumanParam.Weapon[1], true);
238238 if( Weaponindexid != -1 ){
@@ -249,7 +249,7 @@
249249 Human_ShotFlag[Humanindexid] = false;
250250
251251 //プレイヤーならば、番号を記録
252- if( ( (data.p1 == 1)||(data.p1 == 6) )&&(data.p4 == 0) ){
252+ if( ( (data.p1 == POINT_P1TYPE_HUMAN)||(data.p1 == POINT_P1TYPE_HUMAN2) )&&(data.p4 == 0) ){
253253 Player_HumanID = Humanindexid;
254254 }
255255
@@ -368,7 +368,7 @@
368368 int nbs = (unsigned char)data.p3;
369369
370370 //ランダムな武器ならば
371- if( data.p1 == 7 ){
371+ if( data.p1 == POINT_P1TYPE_RAND_WEAPON ){
372372 WeaponParameter WeaponParam;
373373
374374 if( GetRand(2) == 0 ){
@@ -1422,7 +1422,7 @@
14221422 pointdata data;
14231423 PointData->Getdata(&data, i);
14241424
1425- if( data.p1 == 4 ){
1425+ if( data.p1 == POINT_P1TYPE_HUMANINFO ){
14261426 //人のテクスチャを登録
14271427 Resource->AddHumanTexture(data.p2);
14281428 }
@@ -1435,11 +1435,11 @@
14351435 PointData->Getdata(&data, i);
14361436
14371437 //人ならば
1438- if( (data.p1 == 1)||(data.p1 == 6) ){
1438+ if( (data.p1 == POINT_P1TYPE_HUMAN)||(data.p1 == POINT_P1TYPE_HUMAN2) ){
14391439 pointdata humaninfodata;
14401440
14411441 //人情報ポイントを探す
1442- if( PointData->SearchPointdata(&humaninfodata, 0x01 + 0x08, 4, 0, 0, data.p2, 0) == 0 ){
1442+ if( PointData->SearchPointdata(&humaninfodata, 0x01 + 0x08, POINT_P1TYPE_HUMANINFO, 0, 0, data.p2, 0) == 0 ){
14431443 //continue;
14441444
14451445 //人情報ポイントが見つからなかったら、とりあえず「特殊 黒 A」として追加。(バグの再現)
@@ -1455,7 +1455,7 @@
14551455 Resource->AddHumanTexture(0);
14561456
14571457 //人を追加
1458- if( data.p1 == 6 ){
1458+ if( data.p1 == POINT_P1TYPE_HUMAN2 ){
14591459 Weapon[1] = ID_WEAPON_NONE;
14601460 }
14611461
@@ -1477,12 +1477,12 @@
14771477 }
14781478
14791479 //武器ならば
1480- if( (data.p1 == 2)||(data.p1 == 7) ){
1480+ if( (data.p1 == POINT_P1TYPE_WEAPON)||(data.p1 == POINT_P1TYPE_RAND_WEAPON) ){
14811481 AddWeaponIndex(data);
14821482 }
14831483
14841484 //小物ならば
1485- if( data.p1 == 5 ){
1485+ if( data.p1 == POINT_P1TYPE_SMALLOBJ ){
14861486 AddSmallObjectIndex(data);
14871487 }
14881488 }