Skip to content

Commit

Permalink
Use ArxDuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli2 committed Aug 16, 2016
1 parent c68a85e commit 7e046e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/animation/AnimationRender.cpp
Expand Up @@ -1132,7 +1132,7 @@ static void Cedric_RenderObject(EERIE_3DOBJ * eobj, Skeleton * obj, Entity * io,
if(io && (io->sfx_flag & SFX_TYPE_YLSIDE_DEATH) && io->show != SHOW_FLAG_TELEPORTING) {
const ArxDuration elapsed = arxtime.now() - io->sfx_time;
if(elapsed >= ArxDurationMs(3000) && elapsed < ArxDurationMs(6000)) {
float ratio = (elapsed - 3000) * (1.0f / 3000);
float ratio = toMs(elapsed - ArxDurationMs(3000)) * (1.0f / 3000);
glowColor = Color::gray(ratio).toRGB();
glow = true;
}
Expand Down
2 changes: 2 additions & 0 deletions src/core/TimeTypes.h
Expand Up @@ -140,12 +140,14 @@ inline ArxInstant operator -(ArxInstant a, ArxDuration b) {
return ArxInstant(a.t - b.t);
}

#ifndef ARX_REFACTOR_TIMETYPES
inline ArxDuration operator +(ArxDuration a, ArxDuration b) {
return ArxDuration(a.t + b.t);
}
inline ArxDuration operator -(ArxDuration a, ArxDuration b) {
return ArxDuration(a.t - b.t);
}
#endif

// FIXME copy-paste

Expand Down

0 comments on commit 7e046e2

Please sign in to comment.