X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。
| Revision | 202 (tree) |
|---|---|
| Time | 2018-05-07 00:33:50 |
| Author | |
関数名の誤字修正、変数の初期化漏れ修正、コメントの誤記修正
| @@ -36,7 +36,7 @@ | ||
| 36 | 36 | { |
| 37 | 37 | ObjMgr = in_ObjMgr; |
| 38 | 38 | ctrlid = in_ctrlid; |
| 39 | - ctrlhuman = in_ObjMgr->GeHumanObject(in_ctrlid); | |
| 39 | + ctrlhuman = in_ObjMgr->GetHumanObject(in_ctrlid); | |
| 40 | 40 | blocks = in_blocks; |
| 41 | 41 | Param = in_Param; |
| 42 | 42 | CollD = in_CollD; |
| @@ -72,7 +72,7 @@ | ||
| 72 | 72 | { |
| 73 | 73 | ObjMgr = in_ObjMgr; |
| 74 | 74 | ctrlid = in_ctrlid; |
| 75 | - ctrlhuman = in_ObjMgr->GeHumanObject(in_ctrlid); | |
| 75 | + ctrlhuman = in_ObjMgr->GetHumanObject(in_ctrlid); | |
| 76 | 76 | blocks = in_blocks; |
| 77 | 77 | Param = in_Param; |
| 78 | 78 | CollD = in_CollD; |
| @@ -853,7 +853,7 @@ | ||
| 853 | 853 | { |
| 854 | 854 | int selectweapon; |
| 855 | 855 | class weapon *weapon[TOTAL_HAVEWEAPON]; |
| 856 | - int nbs; | |
| 856 | + int nbs = 0; | |
| 857 | 857 | |
| 858 | 858 | for(int i=0; i<TOTAL_HAVEWEAPON; i++){ |
| 859 | 859 | weapon[i] = NULL; |
| @@ -1327,7 +1327,7 @@ | ||
| 1327 | 1327 | |
| 1328 | 1328 | //人のオブジェクトを取得 |
| 1329 | 1329 | class human* thuman; |
| 1330 | - thuman = ObjMgr->GeHumanObject(id); | |
| 1330 | + thuman = ObjMgr->GetHumanObject(id); | |
| 1331 | 1331 | if( thuman == NULL ){ return false; } |
| 1332 | 1332 | |
| 1333 | 1333 | //同名関数をオーバーロード |
| @@ -1392,7 +1392,7 @@ | ||
| 1392 | 1392 | |
| 1393 | 1393 | //ターゲットのクラスを取得 |
| 1394 | 1394 | class human* thuman; |
| 1395 | - thuman = ObjMgr->GeHumanObject(id); | |
| 1395 | + thuman = ObjMgr->GetHumanObject(id); | |
| 1396 | 1396 | if( thuman == NULL ){ return false; } |
| 1397 | 1397 | if( thuman->GetEnableFlag() == false ){ return false; } |
| 1398 | 1398 |
| @@ -1580,7 +1580,7 @@ | ||
| 1580 | 1580 | if( (MoveNavi->GetMoveMode() == AI_TRACKING)&&(GetRand(3) == 0) ){ |
| 1581 | 1581 | float x, z; |
| 1582 | 1582 | float tx, tz; |
| 1583 | - class human *targethuman = ObjMgr->GeHumanObject(MoveNavi->GetTargetHumanID()); | |
| 1583 | + class human *targethuman = ObjMgr->GetHumanObject(MoveNavi->GetTargetHumanID()); | |
| 1584 | 1584 | targethuman->GetPosData(&tx, NULL, &tz, NULL); |
| 1585 | 1585 | x = posx - tx; |
| 1586 | 1586 | z = posz - tz; |
| @@ -1909,7 +1909,7 @@ | ||
| 1909 | 1909 | hold = false; |
| 1910 | 1910 | path_pointid = 0; |
| 1911 | 1911 | |
| 1912 | - ObjMgr->GeHumanObject(ctrlid)->GetParamData(NULL, &path_pointid, NULL, NULL); | |
| 1912 | + ObjMgr->GetHumanObject(ctrlid)->GetParamData(NULL, &path_pointid, NULL, NULL); | |
| 1913 | 1913 | MovePathNextState(); |
| 1914 | 1914 | } |
| 1915 | 1915 |
| @@ -1921,7 +1921,7 @@ | ||
| 1921 | 1921 | if( hold == true ){ |
| 1922 | 1922 | if( movemode == AI_TRACKING ){ |
| 1923 | 1923 | class human *targethuman; |
| 1924 | - targethuman = ObjMgr->GeHumanObject(target_humanid); | |
| 1924 | + targethuman = ObjMgr->GetHumanObject(target_humanid); | |
| 1925 | 1925 | targethuman->GetPosData(&target_posx, NULL, &target_posz, &target_rx); |
| 1926 | 1926 | } |
| 1927 | 1927 | return true; |
| @@ -1969,7 +1969,7 @@ | ||
| 1969 | 1969 | target_humanid = ObjMgr->GetHumanObjectID(targethuman); |
| 1970 | 1970 | } |
| 1971 | 1971 | |
| 1972 | - targethuman = ObjMgr->GeHumanObject(target_humanid); | |
| 1972 | + targethuman = ObjMgr->GetHumanObject(target_humanid); | |
| 1973 | 1973 | targethuman->GetPosData(&target_posx, NULL, &target_posz, &target_rx); |
| 1974 | 1974 | } |
| 1975 | 1975 | else{ |
| @@ -2235,7 +2235,7 @@ | ||
| 2235 | 2235 | } |
| 2236 | 2236 | |
| 2237 | 2237 | //角度を取得 |
| 2238 | - ObjMgr->GeHumanObject(ctrlid)->GetRxRy(&rx, &ry); | |
| 2238 | + ObjMgr->GetHumanObject(ctrlid)->GetRxRy(&rx, &ry); | |
| 2239 | 2239 | |
| 2240 | 2240 | //角度に加算 |
| 2241 | 2241 | rx += addrx; |
| @@ -2246,7 +2246,7 @@ | ||
| 2246 | 2246 | if( ry < DegreeToRadian(-70) ){ ry = DegreeToRadian(-70); } |
| 2247 | 2247 | |
| 2248 | 2248 | //角度を設定 |
| 2249 | - ObjMgr->GeHumanObject(ctrlid)->SetRxRy(rx, ry); | |
| 2249 | + ObjMgr->GetHumanObject(ctrlid)->SetRxRy(rx, ry); | |
| 2250 | 2250 | |
| 2251 | 2251 | //回転速度の減衰 |
| 2252 | 2252 | addrx *= 0.8f; |
| @@ -1534,7 +1534,7 @@ | ||
| 1534 | 1534 | } |
| 1535 | 1535 | else{ |
| 1536 | 1536 | for(int i=0; i<MAX_HUMAN; i++){ |
| 1537 | - human *EnemyHuman = ObjMgr.GeHumanObject(i); | |
| 1537 | + human *EnemyHuman = ObjMgr.GetHumanObject(i); | |
| 1538 | 1538 | if( ObjMgr.CheckZombieAttack(myHuman, EnemyHuman) == true ){ |
| 1539 | 1539 | ObjMgr.HitZombieAttack(myHuman, EnemyHuman); |
| 1540 | 1540 | } |
| @@ -2081,7 +2081,7 @@ | ||
| 2081 | 2081 | int EnemyID; |
| 2082 | 2082 | float mposx, mposz; |
| 2083 | 2083 | int movemode; |
| 2084 | - ObjMgr.GeHumanObject(AIdebuginfoID)->GetPosData(&posx, &posy, &posz, &rx); | |
| 2084 | + ObjMgr.GetHumanObject(AIdebuginfoID)->GetPosData(&posx, &posy, &posz, &rx); | |
| 2085 | 2085 | EnemyID = HumanAI[AIdebuginfoID].GetEnemyHumanID(); |
| 2086 | 2086 | HumanAI[AIdebuginfoID].GetMoveTargetPos(&mposx, &mposz, &movemode); |
| 2087 | 2087 |
| @@ -2098,7 +2098,7 @@ | ||
| 2098 | 2098 | d3dg->Drawline(mposx, posy, mposz+10.0f, mposx, posy, mposz-10.0f, d3dg->GetColorCode(1.0f,1.0f,0.0f,1.0f)); |
| 2099 | 2099 | |
| 2100 | 2100 | if( EnemyID != -1 ){ |
| 2101 | - ObjMgr.GeHumanObject(EnemyID)->GetPosData(&posx, &posy, &posz, &rx); | |
| 2101 | + ObjMgr.GetHumanObject(EnemyID)->GetPosData(&posx, &posy, &posz, &rx); | |
| 2102 | 2102 | |
| 2103 | 2103 | //攻撃対象 |
| 2104 | 2104 | d3dg->Drawline(posx+3.0f, posy, posz+3.0f, posx+3.0f, posy, posz-3.0f, d3dg->GetColorCode(1.0f,0.0f,0.0f,1.0f)); |
| @@ -2445,8 +2445,8 @@ | ||
| 2445 | 2445 | float mposx, mposz; |
| 2446 | 2446 | int movemode; |
| 2447 | 2447 | pointdata ppdata; |
| 2448 | - ObjMgr.GeHumanObject(AIdebuginfoID)->GetPosData(&posx, &posy, &posz, &rx); | |
| 2449 | - hp = ObjMgr.GeHumanObject(AIdebuginfoID)->GetHP(); | |
| 2448 | + ObjMgr.GetHumanObject(AIdebuginfoID)->GetPosData(&posx, &posy, &posz, &rx); | |
| 2449 | + hp = ObjMgr.GetHumanObject(AIdebuginfoID)->GetHP(); | |
| 2450 | 2450 | HumanAI[AIdebuginfoID].GetBattleMode(NULL, modestr); |
| 2451 | 2451 | EnemyID = HumanAI[AIdebuginfoID].GetEnemyHumanID(); |
| 2452 | 2452 | HumanAI[AIdebuginfoID].GetMoveTargetPos(&mposx, &mposz, &movemode); |
| @@ -2700,7 +2700,7 @@ | ||
| 2700 | 2700 | //プレイヤーの情報を取得 |
| 2701 | 2701 | int PlayerID = ObjMgr.GetPlayerID(); |
| 2702 | 2702 | int myteamid; |
| 2703 | - ObjMgr.GeHumanObject(PlayerID)->GetParamData(NULL, NULL, NULL, &myteamid); | |
| 2703 | + ObjMgr.GetHumanObject(PlayerID)->GetParamData(NULL, NULL, NULL, &myteamid); | |
| 2704 | 2704 | |
| 2705 | 2705 | //人を描画 |
| 2706 | 2706 | for(int i=0; i<MAX_HUMAN; i++){ |
| @@ -2713,7 +2713,7 @@ | ||
| 2713 | 2713 | int color; |
| 2714 | 2714 | |
| 2715 | 2715 | //人のオブジェクトを取得 |
| 2716 | - thuman = ObjMgr.GeHumanObject(i); | |
| 2716 | + thuman = ObjMgr.GetHumanObject(i); | |
| 2717 | 2717 | |
| 2718 | 2718 | //使われていない人や死体は無視する |
| 2719 | 2719 | if( thuman->GetEnableFlag() == false ){ continue; } |
| @@ -2895,7 +2895,7 @@ | ||
| 2895 | 2895 | for(int i=0; i<MAX_HUMAN; i++){ |
| 2896 | 2896 | int teamid; |
| 2897 | 2897 | bool deadflag; |
| 2898 | - human *thuman = ObjMgr.GeHumanObject(i); | |
| 2898 | + human *thuman = ObjMgr.GetHumanObject(i); | |
| 2899 | 2899 | if( thuman->GetEnableFlag() == true ){ |
| 2900 | 2900 | //死亡状態とチーム番号を取得 |
| 2901 | 2901 | deadflag = thuman->GetDeadFlag(); |
| @@ -3408,7 +3408,7 @@ | ||
| 3408 | 3408 | if( (0 <= id)&&(id < MAX_HUMAN) ){ |
| 3409 | 3409 | int param, hp; |
| 3410 | 3410 | HumanParameter data; |
| 3411 | - human *thuman = ObjMgr.GeHumanObject(id); | |
| 3411 | + human *thuman = ObjMgr.GetHumanObject(id); | |
| 3412 | 3412 | |
| 3413 | 3413 | //初期時のHPを取得 |
| 3414 | 3414 | thuman->GetParamData(¶m, NULL, NULL, NULL); |
| @@ -3429,7 +3429,7 @@ | ||
| 3429 | 3429 | if( InvincibleID == id ){ |
| 3430 | 3430 | //同じ番号が指定されたらなら、無効化 |
| 3431 | 3431 | InvincibleID = -1; |
| 3432 | - ObjMgr.GeHumanObject(id)->SetInvincibleFlag(false); | |
| 3432 | + ObjMgr.GetHumanObject(id)->SetInvincibleFlag(false); | |
| 3433 | 3433 | sprintf(str, "Not invincible Human[%d].", id); |
| 3434 | 3434 | AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), str); |
| 3435 | 3435 | } |
| @@ -3436,7 +3436,7 @@ | ||
| 3436 | 3436 | else{ |
| 3437 | 3437 | //既に誰かが指定されていたら、既に指定されている人を無効化 |
| 3438 | 3438 | if( InvincibleID != -1 ){ |
| 3439 | - ObjMgr.GeHumanObject(InvincibleID)->SetInvincibleFlag(false); | |
| 3439 | + ObjMgr.GetHumanObject(InvincibleID)->SetInvincibleFlag(false); | |
| 3440 | 3440 | sprintf(str, "Not invincible Human[%d].", InvincibleID); |
| 3441 | 3441 | AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), str); |
| 3442 | 3442 | } |
| @@ -3443,7 +3443,7 @@ | ||
| 3443 | 3443 | |
| 3444 | 3444 | //新たに無敵状態の人を指定 |
| 3445 | 3445 | InvincibleID = id; |
| 3446 | - ObjMgr.GeHumanObject(id)->SetInvincibleFlag(true); | |
| 3446 | + ObjMgr.GetHumanObject(id)->SetInvincibleFlag(true); | |
| 3447 | 3447 | sprintf(str, "Invincible Human[%d].", id); |
| 3448 | 3448 | AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), str); |
| 3449 | 3449 | } |
| @@ -3453,7 +3453,7 @@ | ||
| 3453 | 3453 | //殺害 |
| 3454 | 3454 | if( GetCommandNum("kill", &id) == true ){ |
| 3455 | 3455 | if( (0 <= id)&&(id < MAX_HUMAN) ){ |
| 3456 | - human *thuman = ObjMgr.GeHumanObject(id); | |
| 3456 | + human *thuman = ObjMgr.GetHumanObject(id); | |
| 3457 | 3457 | if( thuman->GetEnableFlag() == true ){ |
| 3458 | 3458 | if( thuman->SetHP(0) == true ){ |
| 3459 | 3459 | sprintf(str, "Killed Human[%d].", id); |
| @@ -3489,7 +3489,7 @@ | ||
| 3489 | 3489 | //人を削除 |
| 3490 | 3490 | if( GetCommandNum("delhuman", &id) == true ){ |
| 3491 | 3491 | if( (0 <= id)&&(id < MAX_HUMAN) ){ |
| 3492 | - human *thuman = ObjMgr.GeHumanObject(id); | |
| 3492 | + human *thuman = ObjMgr.GetHumanObject(id); | |
| 3493 | 3493 | if( thuman->GetEnableFlag() == true ){ |
| 3494 | 3494 | |
| 3495 | 3495 | //人が持っている武器もすべて無効にする |
| @@ -3521,7 +3521,7 @@ | ||
| 3521 | 3521 | int dummy; |
| 3522 | 3522 | class weapon *weaponlist[TOTAL_HAVEWEAPON]; |
| 3523 | 3523 | for(int i=0; i<MAX_HUMAN; i++){ |
| 3524 | - human *thuman = ObjMgr.GeHumanObject(i); | |
| 3524 | + human *thuman = ObjMgr.GetHumanObject(i); | |
| 3525 | 3525 | if( thuman->GetEnableFlag() == true ){ |
| 3526 | 3526 | thuman->GetWeapon(&dummy, weaponlist); |
| 3527 | 3527 | for(int j=0; j<TOTAL_HAVEWEAPON; j++){ |
| @@ -1625,7 +1625,7 @@ | ||
| 1625 | 1625 | //! @brief 指定したデータ番号のhumanクラスを取得 |
| 1626 | 1626 | //! @param id データ番号 |
| 1627 | 1627 | //! @return 人オブジェクトのポインタ (無効なデータ番号で NULL) |
| 1628 | -human* ObjectManager::GeHumanObject(int id) | |
| 1628 | +human* ObjectManager::GetHumanObject(int id) | |
| 1629 | 1629 | { |
| 1630 | 1630 | if( (id < 0)||(MAX_HUMAN-1 < id) ){ return NULL; } |
| 1631 | 1631 | return &(HumanIndex[id]); |
| @@ -1635,7 +1635,7 @@ | ||
| 1635 | 1635 | //! @return 人オブジェクト(プレイヤー)のポインタ |
| 1636 | 1636 | human* ObjectManager::GetPlayerHumanObject() |
| 1637 | 1637 | { |
| 1638 | - return GeHumanObject(Player_HumanID); | |
| 1638 | + return GetHumanObject(Player_HumanID); | |
| 1639 | 1639 | } |
| 1640 | 1640 | |
| 1641 | 1641 | //! @brief 指定したhumanポインタのデータ番号を取得 |
| @@ -140,7 +140,7 @@ | ||
| 140 | 140 | void SetFriendlyFireFlag(bool flag); |
| 141 | 141 | int GetPlayerID(); |
| 142 | 142 | void SetPlayerID(int id); |
| 143 | - human* GeHumanObject(int id); | |
| 143 | + human* GetHumanObject(int id); | |
| 144 | 144 | human* GetPlayerHumanObject(); |
| 145 | 145 | int GetHumanObjectID(human* object); |
| 146 | 146 | weapon* GetWeaponObject(int id); |
| @@ -32,7 +32,7 @@ | ||
| 32 | 32 | #ifndef SOUND2_H |
| 33 | 33 | #define SOUND2_H |
| 34 | 34 | |
| 35 | -#define MAX_LOADSOUND 24 //!< サウンドを読み込める最大数(ezds.dll) | |
| 35 | +#define MAX_LOADSOUND 24 //!< サウンドを読み込める最大数 | |
| 36 | 36 | #define MAX_SOUNDLISTS 100 //!< サウンドを再生する最大数(DirectSound) |
| 37 | 37 | #define MAX_SOUNDDIST 335 //!< サウンドを再生する最大距離 |
| 38 | 38 |