Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 630 vs 631 for /trunk/Source Code/Dynamics/Entities/Particles/ConcreteUpdaters/ParticleBasicTimeUpdater.cpp

Diff revisions: vs.
  @@ -2,8 +2,8 @@
2 2
3 3 namespace Divide {
4 4
5 - void ParticleBasicTimeUpdater::update(const U64 deltaTime, std::shared_ptr<ParticleData> p) {
6 - U32 endID = p->aliveCount();
5 + void ParticleBasicTimeUpdater::update(const U64 deltaTime, ParticleData& p) {
6 + U32 endID = p.aliveCount();
7 7 const F32 localDT = Time::MicrosecondsToSeconds<F32>(deltaTime);
8 8
9 9 if (endID == 0) {
  @@ -11,15 +11,15 @@
11 11 }
12 12
13 13 for (U32 i = 0; i < endID; ++i) {
14 - p->_misc[i].x -= localDT;
14 + p._misc[i].x -= localDT;
15 15 // interpolation: from 0 (start of life) till 1 (end of life)
16 - p->_misc[i].y =
17 - 1.0f - (p->_misc[i].x * p->_misc[i].z); // .z is 1.0/max life time
16 + p._misc[i].y =
17 + 1.0f - (p._misc[i].x * p._misc[i].z); // .z is 1.0/max life time
18 18
19 - if (p->_misc[i].x <= 0.0f) {
20 - p->kill(i);
21 - endID = p->aliveCount() < p->totalCount() ? p->aliveCount()
22 - : p->totalCount();
19 + if (p._misc[i].x <= 0.0f) {
20 + p.kill(i);
21 + endID = p.aliveCount() < p.totalCount() ? p.aliveCount()
22 + : p.totalCount();
23 23 }
24 24 }
25 25 }