Violet Vreath is Shooter Game for Windows XP+(個人制作シューティングゲーム)
Révision | 56587fff6abc9f8ab8dca02d23d5ff800b86df3d (tree) |
---|---|
l'heure | 2020-03-17 00:13:00 |
Auteur | gecchi <gecchi@XPS8...> |
Commiter | gecchi |
Puppeteer改造中
@@ -81,6 +81,7 @@ | ||
81 | 81 | <ClInclude Include="include\jp\ggaf\core\scene\mainscene.h" /> |
82 | 82 | <ClInclude Include="include\jp\ggaf\core\scene\scene.h" /> |
83 | 83 | <ClInclude Include="include\jp\ggaf\core\scene\spacetime.h" /> |
84 | + <ClInclude Include="include\jp\ggaf\core\util\AccelerationValue.hpp" /> | |
84 | 85 | <ClInclude Include="include\jp\ggaf\core\util\CmRandomNumberGenerator.h" /> |
85 | 86 | <ClInclude Include="include\jp\ggaf\core\util\curtain.hpp" /> |
86 | 87 | <ClInclude Include="include\jp\ggaf\core\util\DetectMemoryLeaks.h" /> |
@@ -96,6 +97,7 @@ | ||
96 | 97 | <ClInclude Include="include\jp\ggaf\core\util\rgb.h" /> |
97 | 98 | <ClInclude Include="include\jp\ggaf\core\util\status.h" /> |
98 | 99 | <ClInclude Include="include\jp\ggaf\core\util\table.h" /> |
100 | + <ClInclude Include="include\jp\ggaf\core\util\TransitionValue.hpp" /> | |
99 | 101 | <ClInclude Include="include\jp\ggaf\core\util\treeelem.hpp" /> |
100 | 102 | <ClInclude Include="include\jp\ggaf\core\util\treespace.hpp" /> |
101 | 103 | <ClInclude Include="include\jp\ggaf\core\util\util.h" /> |
@@ -62,6 +62,7 @@ | ||
62 | 62 | <ClInclude Include="include\jp\ggaf\core\scene\MainScene.h" /> |
63 | 63 | <ClInclude Include="include\jp\ggaf\core\scene\Scene.h" /> |
64 | 64 | <ClInclude Include="include\jp\ggaf\core\scene\Spacetime.h" /> |
65 | + <ClInclude Include="include\jp\ggaf\core\util\AccelerationValue.hpp" /> | |
65 | 66 | <ClInclude Include="include\jp\ggaf\core\util\CmRandomNumberGenerator.h" /> |
66 | 67 | <ClInclude Include="include\jp\ggaf\core\util\Curtain.hpp" /> |
67 | 68 | <ClInclude Include="include\jp\ggaf\core\util\DetectMemoryLeaks.h" /> |
@@ -77,6 +78,7 @@ | ||
77 | 78 | <ClInclude Include="include\jp\ggaf\core\util\Rgb.h" /> |
78 | 79 | <ClInclude Include="include\jp\ggaf\core\util\Status.h" /> |
79 | 80 | <ClInclude Include="include\jp\ggaf\core\util\Table.h" /> |
81 | + <ClInclude Include="include\jp\ggaf\core\util\TransitionValue.hpp" /> | |
80 | 82 | <ClInclude Include="include\jp\ggaf\core\util\TreeElem.hpp" /> |
81 | 83 | <ClInclude Include="include\jp\ggaf\core\util\TreeSpace.hpp" /> |
82 | 84 | <ClInclude Include="include\jp\ggaf\core\util\Util.h" /> |
@@ -159,6 +159,12 @@ | ||
159 | 159 | <ClInclude Include="include\jp\ggaf\core\util\ValueTransitioner.hpp"> |
160 | 160 | <Filter>ヘッダー ファイル</Filter> |
161 | 161 | </ClInclude> |
162 | + <ClInclude Include="include\jp\ggaf\core\util\AccelerationValue.hpp"> | |
163 | + <Filter>ヘッダー ファイル</Filter> | |
164 | + </ClInclude> | |
165 | + <ClInclude Include="include\jp\ggaf\core\util\TransitionValue.hpp"> | |
166 | + <Filter>ヘッダー ファイル</Filter> | |
167 | + </ClInclude> | |
162 | 168 | </ItemGroup> |
163 | 169 | <ItemGroup> |
164 | 170 | <ClCompile Include="src\jp\ggaf\core\actor\ex\ActorDepository.cpp"> |
@@ -378,7 +378,7 @@ template<class T> | ||
378 | 378 | class LinkedListRing; |
379 | 379 | |
380 | 380 | template<class VAL_TYPE> |
381 | -class ValueAccelerator; | |
381 | +class AccelerationValue; | |
382 | 382 | |
383 | 383 | template<class VAL_TYPE, int N> |
384 | 384 | class ValueTransitioner; |
@@ -16,7 +16,7 @@ namespace GgafCore { | ||
16 | 16 | * @author Masatoshi Tsuge |
17 | 17 | */ |
18 | 18 | template<class VAL_TYPE> |
19 | -class ValueAccelerator : public Object { | |
19 | +class AccelerationValue : public Object { | |
20 | 20 | |
21 | 21 | private: |
22 | 22 | enum { |
@@ -74,7 +74,7 @@ public: | ||
74 | 74 | VAL_TYPE _t_acce; |
75 | 75 | |
76 | 76 | public: |
77 | - ValueAccelerator() { | |
77 | + AccelerationValue() { | |
78 | 78 | _is_accelerating = false; |
79 | 79 | _zero_acc_end_flg = true; |
80 | 80 | _top_velo = 0; |
@@ -759,7 +759,7 @@ public: | ||
759 | 759 | #endif |
760 | 760 | } |
761 | 761 | |
762 | - virtual ~ValueAccelerator() { | |
762 | + virtual ~AccelerationValue() { | |
763 | 763 | } |
764 | 764 | }; |
765 | 765 |
@@ -0,0 +1,66 @@ | ||
1 | +#ifndef GGAF_CORE_TRANSITIONVALUE_H_ | |
2 | +#define GGAF_CORE_TRANSITIONVALUE_H_ | |
3 | +#include "GgafCommonHeader.h" | |
4 | +#include "jp/ggaf/core/util/ValueTransitioner.hpp" | |
5 | + | |
6 | +#include "jp/ggaf/core/util/Util.h" | |
7 | + | |
8 | +namespace GgafCore { | |
9 | + | |
10 | +/** | |
11 | + * 値の遷移ヘルパー . | |
12 | + * 終に念願の共通化。 | |
13 | + * @tparam VAL_TYPE 遷移値のデータ型 | |
14 | + * @tparam N インデックス(軸等)の数 | |
15 | + * @version 1.00 | |
16 | + * @since 2014/02/19 | |
17 | + * @author Masatoshi Tsuge | |
18 | + */ | |
19 | +template<class VAL_TYPE> | |
20 | +class TransitionValue : public ValueTransitioner<VAL_TYPE, 1> { | |
21 | +public: | |
22 | + VAL_TYPE _value; | |
23 | +public: | |
24 | + /** | |
25 | + * コンストラクタ<BR> | |
26 | + */ | |
27 | + TransitionValue() : ValueTransitioner<VAL_TYPE, 1>() { | |
28 | + _value = (VAL_TYPE)0; | |
29 | + } | |
30 | + | |
31 | + /** | |
32 | + * 値を取得する(要実装) . | |
33 | + * @param idx インデックス | |
34 | + * @return 値 | |
35 | + */ | |
36 | + virtual VAL_TYPE getValue(int idx) override { | |
37 | + return _value; | |
38 | + } | |
39 | + | |
40 | + virtual VAL_TYPE getValue() { | |
41 | + return _value; | |
42 | + } | |
43 | + | |
44 | + /** | |
45 | + * 値を設定する(要実装) . | |
46 | + * @param idx インデックス | |
47 | + * @param value 値 | |
48 | + */ | |
49 | + virtual void setValue(int idx, VAL_TYPE value) override { | |
50 | + _value = value; | |
51 | + } | |
52 | + | |
53 | + virtual void setValue(VAL_TYPE value) { | |
54 | + _value = value; | |
55 | + } | |
56 | + | |
57 | +public: | |
58 | + | |
59 | + virtual ~TransitionValue() { | |
60 | + } | |
61 | +}; | |
62 | + | |
63 | +} | |
64 | + | |
65 | +#endif /*GGAF_CORE_TRANSITIONVALUE_H_*/ | |
66 | + |
@@ -2,7 +2,7 @@ | ||
2 | 2 | #define GGAF_DX_KAGOASSISTANT_H_ |
3 | 3 | #include "GgafDxCommonHeader.h" |
4 | 4 | #include "jp/ggaf/core/Object.h" |
5 | -#include "jp/ggaf/core/util/ValueAccelerator.hpp" | |
5 | +#include "jp/ggaf/core/util/AccelerationValue.hpp" | |
6 | 6 | #include "jp/ggaf/dx/actor/GeometricActor.h" |
7 | 7 | |
8 | 8 | namespace GgafDx { |
@@ -21,11 +21,11 @@ private: | ||
21 | 21 | /** [r]師匠 */ |
22 | 22 | Kago* _pMaster; |
23 | 23 | /** X軸方向加速装置 */ |
24 | - GgafCore::ValueAccelerator<coord> _smthVxMv; | |
24 | + GgafCore::AccelerationValue<coord> _smthVxMv; | |
25 | 25 | /** Y軸方向加速装置 */ |
26 | - GgafCore::ValueAccelerator<coord> _smthVyMv; | |
26 | + GgafCore::AccelerationValue<coord> _smthVyMv; | |
27 | 27 | /** Z軸方向加速装置 */ |
28 | - GgafCore::ValueAccelerator<coord> _smthVzMv; | |
28 | + GgafCore::AccelerationValue<coord> _smthVzMv; | |
29 | 29 | |
30 | 30 | virtual void behave(); |
31 | 31 |
@@ -2,7 +2,7 @@ | ||
2 | 2 | #define GGAF_DX_MORPHERASSISTANT_H_ |
3 | 3 | #include "GgafDxCommonHeader.h" |
4 | 4 | #include "jp/ggaf/core/Object.h" |
5 | -#include "jp/ggaf/core/util/ValueAccelerator.hpp" | |
5 | +#include "jp/ggaf/core/util/AccelerationValue.hpp" | |
6 | 6 | |
7 | 7 | namespace GgafDx { |
8 | 8 |
@@ -25,7 +25,7 @@ private: | ||
25 | 25 | /** [r]師匠 */ |
26 | 26 | Morpher<T>* _pMaster; |
27 | 27 | /** [r]重み加速器 */ |
28 | - GgafCore::ValueAccelerator<float>* _pa_smthMph; | |
28 | + GgafCore::AccelerationValue<float>* _pa_smthMph; | |
29 | 29 | /** [r]モーフターゲット数(利用頻度が高いので、モデルからコピーして保持) */ |
30 | 30 | int _target_num; |
31 | 31 |
@@ -130,7 +130,7 @@ MorpherAssistantA<T>::MorpherAssistantA(Morpher<T>* prm_pMaster) : GgafCore::Obj | ||
130 | 130 | _pMaster(prm_pMaster) { |
131 | 131 | _target_num = prm_pMaster->_pActor->_pMorphMeshModel->_morph_target_num; |
132 | 132 | |
133 | - _pa_smthMph = NEW GgafCore::ValueAccelerator<float>[_target_num+1]; | |
133 | + _pa_smthMph = NEW GgafCore::AccelerationValue<float>[_target_num+1]; | |
134 | 134 | for (int i = 1; i <= _target_num; i++) { |
135 | 135 | _pa_smthMph[i]._t_velo = _pMaster->_velo[i]; |
136 | 136 | _pa_smthMph[i]._t_acce = _pMaster->_acce[i]; |
@@ -139,7 +139,7 @@ MorpherAssistantA<T>::MorpherAssistantA(Morpher<T>* prm_pMaster) : GgafCore::Obj | ||
139 | 139 | |
140 | 140 | template<class T> |
141 | 141 | void MorpherAssistantA<T>::behave() { |
142 | - GgafCore::ValueAccelerator<float>* pSmthMph = _pa_smthMph; | |
142 | + GgafCore::AccelerationValue<float>* pSmthMph = _pa_smthMph; | |
143 | 143 | GgafCore::ValueTransitioner<float, (MAX_MORPH_TARGET+1)>::Parameter* p = _pMaster->_parameter; |
144 | 144 | for (int i = 1; i <= _target_num; i++) { |
145 | 145 | if (pSmthMph->isAccelerating()) { |
@@ -3,6 +3,7 @@ | ||
3 | 3 | #include "GgafDxCommonHeader.h" |
4 | 4 | #include "jp/ggaf/core/Object.h" |
5 | 5 | #include "jp/ggaf/dx/exception/CriticalException.h" |
6 | +#include "jp/ggaf/core/util/AccelerationValue.hpp" | |
6 | 7 | #include <vector> |
7 | 8 | #include <d3dx9.h> |
8 | 9 | #include <d3dx9anim.h> |
@@ -38,7 +39,7 @@ class Puppeteer : public GgafCore::Object { | ||
38 | 39 | private: |
39 | 40 | /** [r]パペットのアニメーションコントローラー */ |
40 | 41 | ID3DXAnimationController* _pAc; |
41 | - FLOAT _track_speed; | |
42 | +// FLOAT _track_speed; | |
42 | 43 | /** |
43 | 44 | * 芸(モーション) . |
44 | 45 | */ |
@@ -51,13 +52,13 @@ private: | ||
51 | 52 | /** 1ループの時間 */ |
52 | 53 | frame _one_loop_frames; |
53 | 54 | /** ローカルタイム */ |
54 | - double _local_time; | |
55 | - double _local_time_inc; | |
55 | + GgafCore::AccelerationValue<double> _local_time; | |
56 | +// double _local_time_inc; | |
56 | 57 | /** 目標ループ回数(1.5回などの指定も可能) */ |
57 | 58 | double _target_loop; |
58 | 59 | |
59 | 60 | double _loop_count; |
60 | - double _weight; | |
61 | + GgafCore::AccelerationValue<double> _weight; | |
61 | 62 | /** ループ方法 */ |
62 | 63 | PuppeteerMethod _method; |
63 | 64 | public: |
@@ -90,7 +91,7 @@ public: | ||
90 | 91 | * @param prm_pPuppet 操られる者 |
91 | 92 | * @return |
92 | 93 | */ |
93 | - explicit Puppeteer(ID3DXAnimationController* prm_pAc_cloned, FLOAT prm_track_speed = 60.0f / 4800.0f); | |
94 | + explicit Puppeteer(ID3DXAnimationController* prm_pAc_cloned); | |
94 | 95 | |
95 | 96 | // void restore(ID3DXAnimationController* prm_pAc_cloned); |
96 | 97 |
@@ -3,7 +3,7 @@ | ||
3 | 3 | #include "GgafDxCommonHeader.h" |
4 | 4 | |
5 | 5 | #include "jp/ggaf/core/Object.h" |
6 | -#include "jp/ggaf/core/util/ValueAccelerator.hpp" | |
6 | +#include "jp/ggaf/core/util/AccelerationValue.hpp" | |
7 | 7 | |
8 | 8 | namespace GgafDx { |
9 | 9 |
@@ -33,7 +33,7 @@ private: | ||
33 | 33 | |
34 | 34 | /** [r]師匠 */ |
35 | 35 | Rikisha* const _pMaster; |
36 | - GgafCore::ValueAccelerator<int> _smthFaceAng[3]; | |
36 | + GgafCore::AccelerationValue<int> _smthFaceAng[3]; | |
37 | 37 | /** ツイスト情報 */ |
38 | 38 | Twist _tw[3]; |
39 | 39 |
@@ -2,7 +2,7 @@ | ||
2 | 2 | #define GGAF_DX_RIKISHAMVANGASSISTANT_H_ |
3 | 3 | #include "GgafDxCommonHeader.h" |
4 | 4 | #include "jp/ggaf/core/Object.h" |
5 | -#include "jp/ggaf/core/util/ValueAccelerator.hpp" | |
5 | +#include "jp/ggaf/core/util/AccelerationValue.hpp" | |
6 | 6 | |
7 | 7 | namespace GgafDx { |
8 | 8 |
@@ -36,8 +36,8 @@ private: | ||
36 | 36 | Pendulum _pnd_ry; |
37 | 37 | /** [r]師匠 */ |
38 | 38 | Rikisha* const _pMaster; |
39 | - GgafCore::ValueAccelerator<int> _smthMvRzAng; | |
40 | - GgafCore::ValueAccelerator<int> _smthMvRyAng; | |
39 | + GgafCore::AccelerationValue<int> _smthMvRzAng; | |
40 | + GgafCore::AccelerationValue<int> _smthMvRyAng; | |
41 | 41 | |
42 | 42 | /** |
43 | 43 | * 力車の助手が振る舞う . |
@@ -2,7 +2,7 @@ | ||
2 | 2 | #define GGAF_DX_RIKISHAMVASSISTANT_H_ |
3 | 3 | #include "GgafDxCommonHeader.h" |
4 | 4 | #include "jp/ggaf/core/Object.h" |
5 | -#include "jp/ggaf/core/util/ValueAccelerator.hpp" | |
5 | +#include "jp/ggaf/core/util/AccelerationValue.hpp" | |
6 | 6 | |
7 | 7 | namespace GgafDx { |
8 | 8 |
@@ -19,7 +19,7 @@ class RikishaMvAssistant : public GgafCore::Object { | ||
19 | 19 | private: |
20 | 20 | /** [r]師匠 */ |
21 | 21 | Rikisha* const _pMaster; |
22 | - GgafCore::ValueAccelerator<int> _smthMv; | |
22 | + GgafCore::AccelerationValue<int> _smthMv; | |
23 | 23 | |
24 | 24 | /** |
25 | 25 | * 力車の助手が振る舞う . |
@@ -108,7 +108,7 @@ public: | ||
108 | 108 | /** [アニメーションセットインデックス][フレームインデックス] で アニメーションセットのアニメーション対象のフレームであるかどうかが返る */ |
109 | 109 | bool** _papaBool_AnimationSetIndex_BoneFrameIndex_is_act; |
110 | 110 | |
111 | - int _anim_ticks_per_second; | |
111 | +// int _anim_ticks_per_second; | |
112 | 112 | /** 60フレーム(1秒)で1ループする場合の1フレーム辺りの時間 */ |
113 | 113 | // double _advance_time_per_frame0;//60フレーム(1秒)で1ループすることを標準設定とする。 |
114 | 114 |
@@ -126,7 +126,7 @@ public: | ||
126 | 126 | |
127 | 127 | ID3DXAnimationController* getCloneAnimationController(); |
128 | 128 | |
129 | - static int getAnimTicksPerSecond(std::string& prm_xfile_name); | |
129 | +// static int getAnimTicksPerSecond(std::string& prm_xfile_name); | |
130 | 130 | |
131 | 131 | /** フレームを巡って情報取得 */ |
132 | 132 | void setFrameInfo(SkinAniMeshFrame* prm_pFrame); |
@@ -33,8 +33,8 @@ _stackWorldMat() { | ||
33 | 33 | defineRotMvWorldMatrix(UTIL::setWorldMatrix_RxRzRyMv); //デフォルトの回転×移動の変換行列 |
34 | 34 | |
35 | 35 | ID3DXAnimationController* pAc_cloned = _pSkinAniMeshModel->getCloneAnimationController(); |
36 | - FLOAT track_speed = 60.0f / (FLOAT)(_pSkinAniMeshModel->_anim_ticks_per_second); | |
37 | - _pPuppeteer = NEW Puppeteer(pAc_cloned, track_speed); | |
36 | +// FLOAT track_speed = 60.0f / (FLOAT)(_pSkinAniMeshModel->_anim_ticks_per_second); | |
37 | + _pPuppeteer = NEW Puppeteer(pAc_cloned); | |
38 | 38 | SkinAniMeshFrame* pFrameRoot = _pSkinAniMeshModel->_pFrameRoot; |
39 | 39 | _stackWorldMat.registerFrameTransformationMatrix(pFrameRoot); |
40 | 40 | } |
@@ -1,6 +1,6 @@ | ||
1 | 1 | #include "jp/ggaf/dx/actor/supporter/KagoAssistantA.h" |
2 | 2 | |
3 | -#include "jp/ggaf/core/util/ValueAccelerator.hpp" | |
3 | +#include "jp/ggaf/core/util/AccelerationValue.hpp" | |
4 | 4 | #include "jp/ggaf/dx/actor/supporter/Kago.h" |
5 | 5 | #include "jp/ggaf/dx/util/Util.h" |
6 | 6 |
@@ -11,12 +11,12 @@ Puppeteer::Performance::Performance() { | ||
11 | 11 | _pAnimationSet = nullptr; |
12 | 12 | _animation_set_index = 0; |
13 | 13 | _one_loop_frames = 60; |
14 | - _local_time = 0.0; | |
15 | - _local_time_inc = 0.0; | |
14 | + _local_time._t_value = 0.0; | |
15 | +// _local_time_inc = 0.0; | |
16 | 16 | _target_loop = -1; |
17 | 17 | _loop_count = 0; |
18 | 18 | _period = 1.0; |
19 | - _weight = 1.0; | |
19 | + _weight._t_value = 1.0; | |
20 | 20 | _method = NO_CHENGE; |
21 | 21 | } |
22 | 22 | void Puppeteer::Performance::setAnimationSet(LPD3DXANIMATIONSET prm_pAnimationSet, UINT prm_animation_set_index) { |
@@ -29,11 +29,11 @@ Puppeteer::Performance::~Performance() { | ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
32 | -Puppeteer::Puppeteer(ID3DXAnimationController* prm_pAc_cloned, FLOAT prm_track_speed) : GgafCore::Object() { | |
32 | +Puppeteer::Puppeteer(ID3DXAnimationController* prm_pAc_cloned) : GgafCore::Object() { | |
33 | 33 | _num_perform = 0; |
34 | 34 | _paPerformances = nullptr; |
35 | 35 | _pAc = prm_pAc_cloned; |
36 | - _track_speed = prm_track_speed; | |
36 | +// _track_speed = prm_track_speed; | |
37 | 37 | HRESULT hr; |
38 | 38 | _num_perform = _pAc->GetMaxNumAnimationSets(); |
39 | 39 | #ifdef MY_DEBUG |
@@ -133,8 +133,19 @@ void Puppeteer::play(PuppeteerStick prm_handed, | ||
133 | 133 | } |
134 | 134 | Performance* p = &(_paPerformances[prm_performance_no]); |
135 | 135 | p->_one_loop_frames = prm_one_loop_frames; |
136 | - p->_local_time = 0; | |
137 | - p->_local_time_inc = p->_period / p->_one_loop_frames; | |
136 | +// p->_local_time._t_value = 0.0; | |
137 | +// p->_local_time_inc = p->_period / p->_one_loop_frames; | |
138 | + p->_local_time.accelerateByDt( | |
139 | + p->_period, //VAL_TYPE prm_target_value_distance, | |
140 | + p->_one_loop_frames, //frame prm_frame_of_target, | |
141 | + 0.4, 0.6, //double prm_p1, double prm_p2, | |
142 | + 0.0, //VAL_TYPE prm_end_velo, | |
143 | + true //bool prm_zero_acc_end_flg | |
144 | + ); | |
145 | + | |
146 | + | |
147 | + | |
148 | + | |
138 | 149 | p->_target_loop = prm_loopnum; |
139 | 150 | p->_loop_count = 0; |
140 | 151 | p->_method = prm_method; |
@@ -150,19 +161,25 @@ void Puppeteer::behave() { | ||
150 | 161 | if (p->_method == NO_CHENGE) { |
151 | 162 | break; |
152 | 163 | } else if (p->_method == PLAY_LOOPING) { |
153 | - p->_local_time += (p->_local_time_inc); | |
154 | - | |
155 | - //ループ完判定 | |
156 | - if (p->_target_loop > 0 && p->_target_loop < ABS(p->_local_time) / p->_period) { | |
157 | - if (p->_local_time > 0) { | |
158 | - //理想値に補正 | |
159 | - p->_local_time = p->_target_loop * p->_period; | |
160 | - } else { | |
161 | - //理想値に補正 | |
162 | - p->_local_time = - (p->_target_loop * p->_period); | |
163 | - } | |
164 | - p->_method = NO_CHENGE; | |
164 | +// p->_local_time._t_value += (p->_local_time_inc); | |
165 | + | |
166 | + if (p->_local_time.isAccelerating()) { | |
167 | + p->_local_time.behave(); | |
168 | + } else { | |
169 | + p->_method = NO_CHENGE; | |
165 | 170 | } |
171 | + | |
172 | +// //ループ完判定 | |
173 | +// if (p->_target_loop > 0 && p->_target_loop < ABS(p->_local_time._t_value) / p->_period) { | |
174 | +// if (p->_local_time._t_value > 0) { | |
175 | +// //理想値に補正 | |
176 | +// p->_local_time._t_value = p->_target_loop * p->_period; | |
177 | +// } else { | |
178 | +// //理想値に補正 | |
179 | +// p->_local_time._t_value = - (p->_target_loop * p->_period); | |
180 | +// } | |
181 | +// p->_method = NO_CHENGE; | |
182 | +// } | |
166 | 183 | } else { |
167 | 184 | throwCriticalException("そんなメソッドはは未サポートです。 p->_method="<<p->_method); |
168 | 185 | } |
@@ -215,11 +232,11 @@ void Puppeteer::updateAnimationTrack() { | ||
215 | 232 | if (pPerformance) { |
216 | 233 | hr = pAc->SetTrackAnimationSet(tno, pPerformance->_pAnimationSet); |
217 | 234 | checkDxException(hr, D3D_OK, "失敗しました。"); |
218 | - hr = pAc->SetTrackPosition(tno, pPerformance->_local_time); | |
235 | + hr = pAc->SetTrackPosition(tno, pPerformance->_local_time._t_value); | |
219 | 236 | checkDxException(hr, D3D_OK, "失敗しました。"); |
220 | 237 | hr = pAc->SetTrackSpeed(tno, pPerformance->_period); |
221 | 238 | checkDxException(hr, D3D_OK, "失敗しました。"); |
222 | - hr = pAc->SetTrackWeight(tno, pPerformance->_weight); | |
239 | + hr = pAc->SetTrackWeight(tno, pPerformance->_weight._t_value); | |
223 | 240 | checkDxException(hr, D3D_OK, "失敗しました。"); |
224 | 241 | _paAs[tno] = pPerformance->_pAnimationSet; |
225 | 242 | } else { |
@@ -1,6 +1,6 @@ | ||
1 | 1 | #include "jp/ggaf/dx/actor/supporter/RikishaFaceAngAssistant.h" |
2 | 2 | |
3 | -#include "jp/ggaf/core/util/ValueAccelerator.hpp" | |
3 | +#include "jp/ggaf/core/util/AccelerationValue.hpp" | |
4 | 4 | #include "jp/ggaf/dx/actor/supporter/Rikisha.h" |
5 | 5 | #include "jp/ggaf/dx/util/Util.h" |
6 | 6 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | #include "jp/ggaf/dx/actor/supporter/RikishaMvAngAssistant.h" |
2 | 2 | |
3 | -#include "jp/ggaf/core/util/ValueAccelerator.hpp" | |
3 | +#include "jp/ggaf/core/util/AccelerationValue.hpp" | |
4 | 4 | #include "jp/ggaf/dx/actor/supporter/Rikisha.h" |
5 | 5 | #include "jp/ggaf/dx/util/Util.h" |
6 | 6 |
@@ -1,7 +1,7 @@ | ||
1 | 1 | #include "jp/ggaf/dx/actor/supporter/RikishaMvAssistant.h" |
2 | 2 | |
3 | 3 | #include "jp/ggaf/dx/actor/supporter/Rikisha.h" |
4 | -#include "jp/ggaf/core/util/ValueAccelerator.hpp" | |
4 | +#include "jp/ggaf/core/util/AccelerationValue.hpp" | |
5 | 5 | |
6 | 6 | |
7 | 7 | using namespace GgafDx; |
@@ -25,7 +25,7 @@ SkinAniMeshModel::SkinAniMeshModel(const char* prm_model_name) : Model(prm_model | ||
25 | 25 | _pFrameRoot = nullptr; |
26 | 26 | _pAniControllerBase = nullptr; |
27 | 27 | _num_materials = 0L; |
28 | - _anim_ticks_per_second = 4800; //restoreSkinAniMeshModel で上書きされる場合がある。 | |
28 | +// _anim_ticks_per_second = 4800; //restoreSkinAniMeshModel で上書きされる場合がある。 | |
29 | 29 | _paVtxBuffer_data = nullptr; |
30 | 30 | _paIndexBuffer_data = nullptr; |
31 | 31 | _pVertexDeclaration = nullptr; |
@@ -182,12 +182,12 @@ void SkinAniMeshModel::restore() { | ||
182 | 182 | std::string xfile_name = ModelManager::getMeshFileName(_model_name); |
183 | 183 | TextureManager* pTextureManager = pGOD->_pModelManager->_pModelTextureManager; |
184 | 184 | //AnimTicksPerSecondを独自に取り出す。デフォルトは4800 |
185 | - _anim_ticks_per_second = SkinAniMeshModel::getAnimTicksPerSecond(xfile_name); | |
185 | +// _anim_ticks_per_second = SkinAniMeshModel::getAnimTicksPerSecond(xfile_name); | |
186 | 186 | //DEBUG |
187 | -_TRACE_("SkinAniMeshModel::restore() _anim_ticks_per_second="<<_anim_ticks_per_second); | |
188 | - if (_anim_ticks_per_second < 0) { | |
189 | - _anim_ticks_per_second = 4800; | |
190 | - } | |
187 | +//_TRACE_("SkinAniMeshModel::restore() _anim_ticks_per_second="<<_anim_ticks_per_second); | |
188 | +// if (_anim_ticks_per_second < 0) { | |
189 | +// _anim_ticks_per_second = 4800; | |
190 | +// } | |
191 | 191 | //Xファイルのファイルロード |
192 | 192 | _pAllocHierarchy = NEW SkinAniMeshAllocHierarchy(); // CAllocHierarchyBaseの派生クラス |
193 | 193 | hr = D3DXLoadMeshHierarchyFromX( |
@@ -898,46 +898,46 @@ ID3DXAnimationController* SkinAniMeshModel::getCloneAnimationController() { | ||
898 | 898 | checkDxException(hr, D3D_OK, "アニメーションコントローラーのクローンに失敗しました。"); |
899 | 899 | return _pAc; |
900 | 900 | } |
901 | -int SkinAniMeshModel::getAnimTicksPerSecond(std::string& prm_xfile_name) { | |
902 | - if (prm_xfile_name == "") { | |
903 | - throwCriticalException("SkinAniMeshModel::getAnimTicksPerSecond() メッシュファイル("<<prm_xfile_name<<".x)が見つかりません。"); | |
904 | - } | |
905 | - //XファイルからAnimTicksPerSecondの値を独自に取り出す | |
906 | - std::ifstream ifs(prm_xfile_name.c_str()); | |
907 | - if (ifs.fail()) { | |
908 | - throwCriticalException("["<<prm_xfile_name<<"] が開けません"); | |
909 | - } | |
910 | - std::string buf; | |
911 | - bool isdone = false; | |
912 | - int anim_ticks_per_second = -1; | |
913 | - std::string data; | |
914 | - while (isdone == false && !ifs.eof()) { | |
915 | - ifs >> data; | |
916 | - if (data == "AnimTicksPerSecond" || data == "AnimTicksPerSecond{") { | |
917 | - while (isdone == false) { | |
918 | - ifs >> data; | |
919 | - if (data == "{") { | |
920 | - continue; | |
921 | - } else if (data == "}") { | |
922 | - isdone = true; | |
923 | - break; | |
924 | - } else { | |
925 | - anim_ticks_per_second = atoi(data.c_str()); //"60;" → 60を得る | |
926 | - if (anim_ticks_per_second == 0) { | |
927 | - //数値に変換できない場合は無効 | |
928 | - anim_ticks_per_second = -1; | |
929 | - isdone = false; | |
930 | - } else { | |
931 | - isdone = true; | |
932 | - } | |
933 | - break; | |
934 | - } | |
935 | - } | |
936 | - } | |
937 | - } | |
938 | - ifs.close(); | |
939 | - return anim_ticks_per_second; | |
940 | -} | |
901 | +//int SkinAniMeshModel::getAnimTicksPerSecond(std::string& prm_xfile_name) { | |
902 | +// if (prm_xfile_name == "") { | |
903 | +// throwCriticalException("SkinAniMeshModel::getAnimTicksPerSecond() メッシュファイル("<<prm_xfile_name<<".x)が見つかりません。"); | |
904 | +// } | |
905 | +// //XファイルからAnimTicksPerSecondの値を独自に取り出す | |
906 | +// std::ifstream ifs(prm_xfile_name.c_str()); | |
907 | +// if (ifs.fail()) { | |
908 | +// throwCriticalException("["<<prm_xfile_name<<"] が開けません"); | |
909 | +// } | |
910 | +// std::string buf; | |
911 | +// bool isdone = false; | |
912 | +// int anim_ticks_per_second = -1; | |
913 | +// std::string data; | |
914 | +// while (isdone == false && !ifs.eof()) { | |
915 | +// ifs >> data; | |
916 | +// if (data == "AnimTicksPerSecond" || data == "AnimTicksPerSecond{") { | |
917 | +// while (isdone == false) { | |
918 | +// ifs >> data; | |
919 | +// if (data == "{") { | |
920 | +// continue; | |
921 | +// } else if (data == "}") { | |
922 | +// isdone = true; | |
923 | +// break; | |
924 | +// } else { | |
925 | +// anim_ticks_per_second = atoi(data.c_str()); //"60;" → 60を得る | |
926 | +// if (anim_ticks_per_second == 0) { | |
927 | +// //数値に変換できない場合は無効 | |
928 | +// anim_ticks_per_second = -1; | |
929 | +// isdone = false; | |
930 | +// } else { | |
931 | +// isdone = true; | |
932 | +// } | |
933 | +// break; | |
934 | +// } | |
935 | +// } | |
936 | +// } | |
937 | +// } | |
938 | +// ifs.close(); | |
939 | +// return anim_ticks_per_second; | |
940 | +//} | |
941 | 941 | |
942 | 942 | void SkinAniMeshModel::setFrameInfo(SkinAniMeshFrame* prm_pFrame) { |
943 | 943 | prm_pFrame->_frame_index = _tmp_frame_index; //フレームインデックスを保持 |
@@ -1 +1 @@ | ||
1 | -#define VERSION "VER 0.30.6738" | |
1 | +#define VERSION "VER 0.30.6740" |