X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。
Revision | 36 (tree) |
---|---|
Time | 2015-02-13 02:54:42 |
Author | xops-mikan |
エフェクトのシステムを変更し、薬莢や血の描画を改善。
@@ -466,6 +466,33 @@ | ||
466 | 466 | return -1; |
467 | 467 | } |
468 | 468 | |
469 | +//! @brief エフェクト追加 | |
470 | +//! @param pos_x X座標 | |
471 | +//! @param pos_y Y座標 | |
472 | +//! @param pos_z Z座標 | |
473 | +//! @param move_x X軸移動量 | |
474 | +//! @param move_y Y軸移動量 | |
475 | +//! @param move_z Z軸移動量 | |
476 | +//! @param size 表示倍率 | |
477 | +//! @param rotation 回転角度 | |
478 | +//! @param count 表示フレーム数 | |
479 | +//! @param texture テクスチャの認識番号 | |
480 | +//! @param settype エフェクトの種類 (Effect_Type を組み合せる) | |
481 | +//! @return 成功:データ番号(0以上) 失敗:-1 | |
482 | +int ObjectManager::AddEffect(float pos_x, float pos_y, float pos_z, float move_x, float move_y, float move_z, float size, float rotation, int count, int texture, int settype) | |
483 | +{ | |
484 | + for(int i=0; i<MAX_EFFECT; i++){ | |
485 | + if( EffectIndex[i].GetDrawFlag() == false ){ | |
486 | + EffectIndex[i].SetPosData(pos_x, pos_y, pos_z, 0.0f); | |
487 | + EffectIndex[i].SetParamData(move_x, move_y, move_z, size, rotation, count, texture, settype, true); | |
488 | + EffectIndex[i].SetDrawFlag(true); | |
489 | + return i; | |
490 | + } | |
491 | + } | |
492 | + | |
493 | + return -1; | |
494 | +} | |
495 | + | |
469 | 496 | //! @brief 出血させる |
470 | 497 | //! @param x X座標 |
471 | 498 | //! @param y Y座標 |
@@ -473,22 +500,10 @@ | ||
473 | 500 | void ObjectManager::SetHumanBlood(float x, float y, float z) |
474 | 501 | { |
475 | 502 | if( GameConfig.GetBloodFlag() == true ){ |
476 | - for(int i=0; i<MAX_EFFECT; i++){ | |
477 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
478 | - EffectIndex[i].SetPosData(x+1.0f, y+1.0f, z+1.0f, 0.0f); | |
479 | - EffectIndex[i].SetParamData(10.0f, (float)M_PI/18*GetRand(18), (int)GAMEFPS * 1, Resource->GetEffectBloodTexture(), EFFECT_FALL, true); | |
480 | - EffectIndex[i].SetDrawFlag(true); | |
481 | - break; | |
482 | - } | |
503 | + for(int i=0; i<2; i++){ | |
504 | + float rx = (float)M_PI/18*GetRand(36); | |
505 | + AddEffect(x + cos(rx)*1.0f, y + (float)(GetRand(20)-10)/10, z + sin(rx)*1.0f, cos(rx)*0.5f, 0.5f, sin(rx)*0.5f, 10.0f, (float)M_PI/18*GetRand(18), (int)GAMEFPS * 1, Resource->GetEffectBloodTexture(), EFFECT_FALL); | |
483 | 506 | } |
484 | - for(int i=0; i<MAX_EFFECT; i++){ | |
485 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
486 | - EffectIndex[i].SetPosData(x-1.0f, y-1.0f, z-1.0f, 0.0f); | |
487 | - EffectIndex[i].SetParamData(10.0f, (float)M_PI/18*GetRand(18), (int)GAMEFPS * 1, Resource->GetEffectBloodTexture(), EFFECT_FALL, true); | |
488 | - EffectIndex[i].SetDrawFlag(true); | |
489 | - break; | |
490 | - } | |
491 | - } | |
492 | 507 | } |
493 | 508 | } |
494 | 509 |
@@ -775,14 +790,7 @@ | ||
775 | 790 | void ObjectManager::HitBulletMap(float x, float y, float z) |
776 | 791 | { |
777 | 792 | //エフェクト(煙)を表示 |
778 | - for(int i=0; i<MAX_EFFECT; i++){ | |
779 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
780 | - EffectIndex[i].SetPosData(x, y, z, 0.0f); | |
781 | - EffectIndex[i].SetParamData(5.0f, (float)M_PI/18*GetRand(18), (int)(GAMEFPS * 0.5f), Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY, true); | |
782 | - EffectIndex[i].SetDrawFlag(true); | |
783 | - break; | |
784 | - } | |
785 | - } | |
793 | + AddEffect(x, y, z, 0.0f, 0.05f, 0.0f, 5.0f, (float)M_PI/18*GetRand(18), (int)(GAMEFPS * 0.5f), Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY); | |
786 | 794 | |
787 | 795 | //効果音を再生 |
788 | 796 | GameSound->HitMap(x, y, z); |
@@ -844,14 +852,7 @@ | ||
844 | 852 | SmallObjectIndex[HitSmallObject_id].HitBullet(attacks); |
845 | 853 | |
846 | 854 | //エフェクト(煙)を表示 |
847 | - for(int i=0; i<MAX_EFFECT; i++){ | |
848 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
849 | - EffectIndex[i].SetPosData(x, y, z, 0.0f); | |
850 | - EffectIndex[i].SetParamData(5.0f, (float)M_PI/18*GetRand(18), (int)(GAMEFPS * 0.5f), Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY, true); | |
851 | - EffectIndex[i].SetDrawFlag(true); | |
852 | - break; | |
853 | - } | |
854 | - } | |
855 | + AddEffect(x, y, z, 0.0f, 0.05f, 0.0f, 5.0f, (float)M_PI/18*GetRand(18), (int)(GAMEFPS * 0.5f), Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY); | |
855 | 856 | |
856 | 857 | //効果音を再生 |
857 | 858 | int id; |
@@ -996,49 +997,14 @@ | ||
996 | 997 | } |
997 | 998 | |
998 | 999 | //エフェクト(フラッシュ)の表示 |
999 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1000 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1001 | - EffectIndex[i].SetPosData(gx, gy, gz, 0.0f); | |
1002 | - EffectIndex[i].SetParamData(30.0f, 0.0f, 2, Resource->GetEffectMflashTexture(), EFFECT_NORMAL, true); | |
1003 | - EffectIndex[i].SetDrawFlag(true); | |
1004 | - break; | |
1005 | - } | |
1006 | - } | |
1000 | + AddEffect(gx, gy, gz, 0.0f, 0.0f, 0.0f, 30.0f, 0.0f, 2, Resource->GetEffectMflashTexture(), EFFECT_NORMAL); | |
1007 | 1001 | |
1008 | 1002 | //エフェクト(煙)の表示 |
1009 | 1003 | float rnd = (float)M_PI/18*GetRand(18); |
1010 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1011 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1012 | - EffectIndex[i].SetPosData(gx+1.0f, gy+1.0f, gz+1.0f, 0.0f); | |
1013 | - EffectIndex[i].SetParamData(10.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION, true); | |
1014 | - EffectIndex[i].SetDrawFlag(true); | |
1015 | - break; | |
1016 | - } | |
1017 | - } | |
1018 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1019 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1020 | - EffectIndex[i].SetPosData(gx-1.0f, gy-1.0f, gz-1.0f, 0.0f); | |
1021 | - EffectIndex[i].SetParamData(10.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION, true); | |
1022 | - EffectIndex[i].SetDrawFlag(true); | |
1023 | - break; | |
1024 | - } | |
1025 | - } | |
1026 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1027 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1028 | - EffectIndex[i].SetPosData(gx-1.0f, gy-1.0f, gz+1.0f, 0.0f); | |
1029 | - EffectIndex[i].SetParamData(10.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION, true); | |
1030 | - EffectIndex[i].SetDrawFlag(true); | |
1031 | - break; | |
1032 | - } | |
1033 | - } | |
1034 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1035 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1036 | - EffectIndex[i].SetPosData(gx+1.0f, gy+1.0f, gz-1.0f, 0.0f); | |
1037 | - EffectIndex[i].SetParamData(10.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION, true); | |
1038 | - EffectIndex[i].SetDrawFlag(true); | |
1039 | - break; | |
1040 | - } | |
1041 | - } | |
1004 | + AddEffect(gx+1.0f, gy+1.0f, gz+1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION); | |
1005 | + AddEffect(gx-1.0f, gy-1.0f, gz-1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION); | |
1006 | + AddEffect(gx-1.0f, gy-1.0f, gz+1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION); | |
1007 | + AddEffect(gx+1.0f, gy+1.0f, gz-1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION); | |
1042 | 1008 | |
1043 | 1009 | //効果音を再生 |
1044 | 1010 | GameSound->GrenadeExplosion(gx, gy, gz); |
@@ -1073,38 +1039,10 @@ | ||
1073 | 1039 | |
1074 | 1040 | //エフェクト(煙)の表示 |
1075 | 1041 | float rnd = (float)M_PI/18*GetRand(18); |
1076 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1077 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1078 | - EffectIndex[i].SetPosData(hx+1.0f, hy+1.0f, hz+1.0f, 0.0f); | |
1079 | - EffectIndex[i].SetParamData(10.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION, true); | |
1080 | - EffectIndex[i].SetDrawFlag(true); | |
1081 | - break; | |
1082 | - } | |
1083 | - } | |
1084 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1085 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1086 | - EffectIndex[i].SetPosData(hx-1.0f, hy-1.0f, hz-1.0f, 0.0f); | |
1087 | - EffectIndex[i].SetParamData(10.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION, true); | |
1088 | - EffectIndex[i].SetDrawFlag(true); | |
1089 | - break; | |
1090 | - } | |
1091 | - } | |
1092 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1093 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1094 | - EffectIndex[i].SetPosData(hx-1.0f, hy-1.0f, hz+1.0f, 0.0f); | |
1095 | - EffectIndex[i].SetParamData(10.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION, true); | |
1096 | - EffectIndex[i].SetDrawFlag(true); | |
1097 | - break; | |
1098 | - } | |
1099 | - } | |
1100 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1101 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1102 | - EffectIndex[i].SetPosData(hx+1.0f, hy+1.0f, hz-1.0f, 0.0f); | |
1103 | - EffectIndex[i].SetParamData(10.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION, true); | |
1104 | - EffectIndex[i].SetDrawFlag(true); | |
1105 | - break; | |
1106 | - } | |
1107 | - } | |
1042 | + AddEffect(hx+1.0f, hy+1.0f, hz+1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION); | |
1043 | + AddEffect(hx-1.0f, hy-1.0f, hz-1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION); | |
1044 | + AddEffect(hx-1.0f, hy-1.0f, hz+1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION); | |
1045 | + AddEffect(hx+1.0f, hy+1.0f, hz-1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION); | |
1108 | 1046 | } |
1109 | 1047 | } |
1110 | 1048 |
@@ -1602,6 +1540,8 @@ | ||
1602 | 1540 | int weapon_paramid; |
1603 | 1541 | WeaponParameter ParamData; |
1604 | 1542 | float x, y, z; |
1543 | + float flashsize, smokesize, yakkyousize; | |
1544 | + float rx, mx, my, mz; | |
1605 | 1545 | |
1606 | 1546 | //人の座標と角度を取得 |
1607 | 1547 | HumanIndex[humanid].GetPosData(&pos_x, &pos_y, &pos_z, NULL); |
@@ -1612,13 +1552,19 @@ | ||
1612 | 1552 | if( GameParamInfo->GetWeapon(weapon_paramid, &ParamData) != 0 ){ return; } |
1613 | 1553 | |
1614 | 1554 | //マズルフラッシュと煙のサイズを決定 |
1615 | - float flashsize = 0.06f * ParamData.attacks; | |
1616 | - float smokesize = flashsize; | |
1617 | - float yakkyousize = 0.02f * ParamData.attacks; | |
1555 | + flashsize = 0.06f * ParamData.attacks; | |
1556 | + smokesize = flashsize; | |
1557 | + yakkyousize = 0.01f * ParamData.attacks; | |
1618 | 1558 | if( ParamData.silencer == true ){ |
1619 | 1559 | flashsize /= 2; |
1620 | 1560 | } |
1621 | 1561 | |
1562 | + //薬莢の移動量を決定 | |
1563 | + rx = rotation_x*-1 + (float)M_PI/2; | |
1564 | + mx = cos(rx - (float)M_PI/2) * ParamData.yakkyou_sx /10; | |
1565 | + my = (ParamData.yakkyou_sy + (GetRand(3)-1)) /10; | |
1566 | + mz = sin(rx - (float)M_PI/2) * ParamData.yakkyou_sx /10; | |
1567 | + | |
1622 | 1568 | //行列でエフェクト座標を計算 |
1623 | 1569 | d3dg->SetWorldTransformHumanWeapon(pos_x, pos_y + 16.0f, pos_z, ParamData.flashx/10, ParamData.flashy/10, ParamData.flashz/10, rotation_x, armrotation_y*-1, 1.0f); |
1624 | 1570 | d3dg->GetWorldTransformPos(&x, &y, &z); |
@@ -1625,15 +1571,7 @@ | ||
1625 | 1571 | d3dg->ResetWorldTransform(); |
1626 | 1572 | |
1627 | 1573 | //マズルフラッシュ描画 |
1628 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1629 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1630 | - //エフェクト設定 | |
1631 | - EffectIndex[i].SetPosData(x, y, z, 0.0f); | |
1632 | - EffectIndex[i].SetParamData(flashsize, (float)M_PI/18*GetRand(18), 1, Resource->GetEffectMflashTexture(), EFFECT_NORMAL, true); | |
1633 | - EffectIndex[i].SetDrawFlag(true); | |
1634 | - break; | |
1635 | - } | |
1636 | - } | |
1574 | + AddEffect(x, y, z, 0.0f, 0.0f, 0.0f, flashsize, (float)M_PI/18*GetRand(18), 1, Resource->GetEffectMflashTexture(), EFFECT_NORMAL); | |
1637 | 1575 | |
1638 | 1576 | //行列でエフェクト座標を計算 |
1639 | 1577 | d3dg->SetWorldTransformHumanWeapon(pos_x, pos_y + 16.0f, pos_z, ParamData.flashx/10, ParamData.flashy/10, ParamData.flashz/10 - 0.1f, rotation_x, armrotation_y*-1, 1.0f); |
@@ -1641,15 +1579,7 @@ | ||
1641 | 1579 | d3dg->ResetWorldTransform(); |
1642 | 1580 | |
1643 | 1581 | //エフェクト(煙)の表示 |
1644 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1645 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1646 | - //エフェクト設定 | |
1647 | - EffectIndex[i].SetPosData(x, y, z, 0.0f); | |
1648 | - EffectIndex[i].SetParamData(smokesize, (float)M_PI/18*GetRand(18), (int)(GAMEFPS/3), Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION, true); | |
1649 | - EffectIndex[i].SetDrawFlag(true); | |
1650 | - break; | |
1651 | - } | |
1652 | - } | |
1582 | + AddEffect(x, y, z, 0.0f, 0.05f, 0.0f, smokesize, (float)M_PI/18*GetRand(18), (int)(GAMEFPS/3), Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION); | |
1653 | 1583 | |
1654 | 1584 | //行列でエフェクト座標を計算 |
1655 | 1585 | d3dg->SetWorldTransformHumanWeapon(pos_x, pos_y + 16.0f, pos_z, ParamData.yakkyou_px/10, ParamData.yakkyou_py/10, ParamData.yakkyou_pz/10, rotation_x, armrotation_y*-1, 1.0f); |
@@ -1657,15 +1587,7 @@ | ||
1657 | 1587 | d3dg->ResetWorldTransform(); |
1658 | 1588 | |
1659 | 1589 | //薬莢描画 |
1660 | - for(int i=0; i<MAX_EFFECT; i++){ | |
1661 | - if( EffectIndex[i].GetDrawFlag() == false ){ | |
1662 | - //エフェクト設定 | |
1663 | - EffectIndex[i].SetPosData(x, y, z, 0.0f); | |
1664 | - EffectIndex[i].SetParamData(yakkyousize, (float)M_PI/18*GetRand(18), (int)(GAMEFPS/2), Resource->GetEffectYakkyouTexture(), EFFECT_ROTATION | EFFECT_FALL, true); | |
1665 | - EffectIndex[i].SetDrawFlag(true); | |
1666 | - break; | |
1667 | - } | |
1668 | - } | |
1590 | + AddEffect(x, y, z, mx, my, mz, yakkyousize, (float)M_PI/18*GetRand(18), (int)(GAMEFPS/2), Resource->GetEffectYakkyouTexture(), EFFECT_ROTATION | EFFECT_FALL); | |
1669 | 1591 | } |
1670 | 1592 | |
1671 | 1593 | //! @brief 武器をリロード |
@@ -2509,6 +2509,9 @@ | ||
2509 | 2509 | {} |
2510 | 2510 | |
2511 | 2511 | //! @brief 設定値を設定 |
2512 | +//! @param in_move_x X軸移動量 | |
2513 | +//! @param in_move_y Y軸移動量 | |
2514 | +//! @param in_move_z Z軸移動量 | |
2512 | 2515 | //! @param size 表示倍率 |
2513 | 2516 | //! @param rotation 回転角度 |
2514 | 2517 | //! @param count 表示フレーム数 |
@@ -2515,8 +2518,11 @@ | ||
2515 | 2518 | //! @param texture テクスチャの認識番号 |
2516 | 2519 | //! @param settype エフェクトの種類 (Effect_Type を組み合せる) |
2517 | 2520 | //! @param init オブジェクトを初期化 |
2518 | -void effect::SetParamData(float size, float rotation, int count, int texture, int settype, bool init) | |
2521 | +void effect::SetParamData(float in_move_x, float in_move_y, float in_move_z, float size, float rotation, int count, int texture, int settype, bool init) | |
2519 | 2522 | { |
2523 | + move_x = in_move_x; | |
2524 | + move_y = in_move_y; | |
2525 | + move_z = in_move_z; | |
2520 | 2526 | model_size = size; |
2521 | 2527 | rotation_texture = rotation; |
2522 | 2528 | cnt = count; |
@@ -2550,6 +2556,11 @@ | ||
2550 | 2556 | camera_rx = in_camera_rx; |
2551 | 2557 | camera_ry = in_camera_ry; |
2552 | 2558 | |
2559 | + //座標移動 | |
2560 | + pos_x += move_x; | |
2561 | + pos_y += move_y; | |
2562 | + pos_z += move_z; | |
2563 | + | |
2553 | 2564 | //特殊処理を実行 |
2554 | 2565 | if( type & EFFECT_DISAPPEAR ){ //消す |
2555 | 2566 | alpha -= 1.0f/setcnt; |
@@ -2566,11 +2577,8 @@ | ||
2566 | 2577 | } |
2567 | 2578 | } |
2568 | 2579 | if( type & EFFECT_FALL ){ //落下 |
2569 | - pos_y -= 1.0f; | |
2580 | + move_y = (move_y - 0.17f) * 0.98f; | |
2570 | 2581 | } |
2571 | - else{ | |
2572 | - pos_y += 0.05f; | |
2573 | - } | |
2574 | 2582 | |
2575 | 2583 | //カウントを 1 引く |
2576 | 2584 | cnt -= 1; |
@@ -111,6 +111,7 @@ | ||
111 | 111 | int AddHumanIndex(float px, float py, float pz, float rx, int CharacterID, int TeamID, int WeaponID[]); |
112 | 112 | int AddVisualWeaponIndex(int WeaponID, bool loadbullet); |
113 | 113 | int AddSmallObjectIndex(float px, float py, float pz, float rx, int paramID, bool MapColl); |
114 | + int AddEffect(float pos_x, float pos_y, float pos_z, float move_x, float move_y, float move_z, float size, float rotation, int count, int texture, int settype); | |
114 | 115 | void LoadPointData(); |
115 | 116 | int GetPlayerID(); |
116 | 117 | void SetPlayerID(int id); |
@@ -318,6 +318,9 @@ | ||
318 | 318 | int type; //!< 種類 |
319 | 319 | float camera_rx; //!< カメラ角度 |
320 | 320 | float camera_ry; //!< カメラ角度 |
321 | + float move_x; //!< X軸移動量 | |
322 | + float move_y; //!< Y軸移動量 | |
323 | + float move_z; //!< Z軸移動量 | |
321 | 324 | float rotation_texture; //!< 回転角度 |
322 | 325 | float alpha; //!< 透明度 |
323 | 326 | int cnt; //!< カウント |
@@ -326,7 +329,7 @@ | ||
326 | 329 | public: |
327 | 330 | effect(float x = 0.0f, float y = 0.0f, float z = 0.0f, float size = 1.0f, float rotation = 0.0f, int count = 0, int texture = 0, int settype = 0); |
328 | 331 | ~effect(); |
329 | - virtual void SetParamData(float size, float rotation, int count, int texture, int settype, bool init); | |
332 | + virtual void SetParamData(float in_move_x, float in_move_y, float in_move_z, float size, float rotation, int count, int texture, int settype, bool init); | |
330 | 333 | virtual int RunFrame(float in_camera_rx, float in_camera_ry); |
331 | 334 | virtual void Render(class D3DGraphics *d3dg); |
332 | 335 | }; |