Skip to content

Commit

Permalink
Use zero time constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli2 committed May 1, 2017
1 parent d2edd9f commit 329900d
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/animation/Animation.h
Expand Up @@ -87,7 +87,7 @@ struct EERIE_ANIM
unsigned char * voidgroups;

EERIE_ANIM()
: anim_time(0)
: anim_time(AnimationDuration_ZERO)
, nb_groups(0)
, nb_key_frames(0)
, frames(NULL)
Expand Down Expand Up @@ -127,7 +127,7 @@ struct AnimLayer {
, cur_anim(NULL)
, altidx_next(0)
, altidx_cur(0)
, ctime(0)
, ctime(AnimationDuration_ZERO)
, flags(0)
, nextflags(0)
, lastframe(-1)
Expand Down
2 changes: 1 addition & 1 deletion src/game/Entity.h
Expand Up @@ -147,7 +147,7 @@ struct IO_SPELLCAST_DATA {
, spell_flags()
, spell_level(0)
, target()
, duration(0)
, duration(ArxDuration_ZERO)
{
for(unsigned long j(0); j < 4; j++)
symb[j] = RUNE_NONE;
Expand Down
6 changes: 3 additions & 3 deletions src/game/Player.h
Expand Up @@ -70,7 +70,7 @@ struct ARX_INTERFACE_MEMORIZE_SPELL {

ARX_INTERFACE_MEMORIZE_SPELL()
: bSpell(false)
, lTimeCreation(0)
, lTimeCreation(ArxInstant_ZERO)
{
for(size_t i = 0; i < ARRAY_SIZE(iSpellSymbols); i++) {
iSpellSymbols[i] = RUNE_NONE;
Expand Down Expand Up @@ -342,7 +342,7 @@ struct ARXCHARACTER {
ARXCHARACTER()
: m_strikeDirection(0)
, m_weaponBlocked(-1)
, jumpstarttime(0u)
, jumpstarttime(ArxInstant_ZERO)
, jumplastposition(0.f)
, jumpphase(NotJumping)
, climbing(false)
Expand All @@ -362,7 +362,7 @@ struct ARXCHARACTER {
, Full_maxlife(0)
, Full_maxmana(0)
, AimTime(PlatformDuration_ZERO)
, m_aimTime(0)
, m_aimTime(PlatformDuration_ZERO)
, Attribute_Redistribute(0)
, Skill_Redistribute(0)
, level(0)
Expand Down
4 changes: 2 additions & 2 deletions src/game/magic/Spell.cpp
Expand Up @@ -28,9 +28,9 @@ SpellBase::SpellBase()
: m_level(1.f)
, m_hand_group()
, m_type(SPELL_NONE)
, m_timcreation(0)
, m_timcreation(ArxInstant_ZERO)
, m_hasDuration(false)
, m_duration(0)
, m_duration(ArxDuration_ZERO)
, m_fManaCostPerSecond(0.f)
, m_snd_loop(audio::INVALID_ID)
, m_launchDuration(-1)
Expand Down
2 changes: 1 addition & 1 deletion src/game/magic/spells/SpellsLvl01.cpp
Expand Up @@ -331,7 +331,7 @@ void MagicMissileSpell::Update() {

IgnitSpell::IgnitSpell()
: m_srcPos(Vec3f_ZERO)
, m_elapsed(0)
, m_elapsed(ArxDuration_ZERO)
{

}
Expand Down
2 changes: 1 addition & 1 deletion src/game/magic/spells/SpellsLvl05.cpp
Expand Up @@ -280,7 +280,7 @@ void LevitateSpell::createDustParticle() {

CurePoisonSpell::CurePoisonSpell()
: SpellBase()
, m_elapsed(0)
, m_elapsed(ArxDuration_ZERO)
{}

void CurePoisonSpell::Launch() {
Expand Down
2 changes: 1 addition & 1 deletion src/game/magic/spells/SpellsLvl07.cpp
Expand Up @@ -46,7 +46,7 @@ extern PlatformInstant SLID_START;
bool bOldLookToggle;

FlyingEyeSpell::FlyingEyeSpell()
: m_lastupdate(0)
: m_lastupdate(ArxInstant_ZERO)
{

}
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/particle/Particle.cpp
Expand Up @@ -50,7 +50,7 @@ ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
Particle::Particle()
: p3Pos(arx::randomVec(-5.f, 5.f))
, p3Velocity(arx::randomVec(-10.f, 10.f))
, m_age(0)
, m_age(ArxDuration_ZERO)
, fSize(1.f)
, fSizeStart(1.f)
, fSizeEnd(1.f)
Expand Down
2 changes: 1 addition & 1 deletion src/gui/Console.h
Expand Up @@ -145,7 +145,7 @@ class ScriptConsole : protected BasicTextInput {
, m_originalCursorPos(true)
, m_selection(0)
, m_lastSelectedEntity(EntityHandle_Player)
, m_blinkTime(0)
, m_blinkTime(PlatformDuration_ZERO)
, m_blink(true)
, m_contextBegin(0)
, m_contextEnd(0)
Expand Down
2 changes: 1 addition & 1 deletion src/gui/Credits.cpp
Expand Up @@ -104,7 +104,7 @@ class Credits {
Credits()
: m_background(NULL)
, m_scrollPosition(0.f)
, m_lastUpdateTime(0.f)
, m_lastUpdateTime(PlatformInstant_ZERO)
, m_firstVisibleLine(0)
, m_lineHeight(-1)
, m_windowSize(Vec2i_ZERO)
Expand Down
6 changes: 3 additions & 3 deletions src/gui/Hud.cpp
Expand Up @@ -111,7 +111,7 @@ HitStrengthGauge::HitStrengthGauge()
, m_hitTex(NULL)
, m_intensity(0.f)
, m_flashActive(false)
, m_flashTime(0)
, m_flashTime(PlatformDuration_ZERO)
, m_flashIntensity(0.f)
{}

Expand Down Expand Up @@ -218,7 +218,7 @@ void BookIconGui::MakeBookFX() {
BookIconGui::BookIconGui()
: HudIconBase()
, m_size(Vec2f(32, 32))
, ulBookHaloTime(0)
, ulBookHaloTime(PlatformDuration_ZERO)
{}

void BookIconGui::init() {
Expand Down Expand Up @@ -453,7 +453,7 @@ PurseIconGui::PurseIconGui()
: HudIconBase()
, m_pos()
, m_size()
, m_haloTime(0)
, m_haloTime(PlatformDuration_ZERO)
{}

void PurseIconGui::init() {
Expand Down

0 comments on commit 329900d

Please sign in to comment.