diff --git a/Source/DiabloUI/settingsmenu.cpp b/Source/DiabloUI/settingsmenu.cpp index 85f35003c..95ac45e5e 100644 --- a/Source/DiabloUI/settingsmenu.cpp +++ b/Source/DiabloUI/settingsmenu.cpp @@ -181,7 +181,7 @@ bool ChangeOptionValue(OptionEntryBase *pOption, size_t listIndex) } if (HasAnyOf(pOption->GetFlags(), OptionEntryFlags::RecreateUI)) { - // Reinitalize UI with changed settings (for example game mode, language or resolution) + // Reinitialize UI with changed settings (for example game mode, language or resolution) UiInitialize(); InitItemGFX(); SetHardwareCursor(CursorInfo::UnknownCursor()); diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 9cf1cf2dc..c6b8614df 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -1139,7 +1139,7 @@ void DiabloInit() if (gbIsHellfire && !forceHellfire && *sgOptions.StartUp.gameMode == StartUpGameMode::Ask) { UiSelStartUpGameOption(); if (!gbIsHellfire) { - // Reinitalize the UI Elements cause we changed the game + // Reinitialize the UI Elements cause we changed the game UnloadUiGFX(); UiInitialize(); if (IsHardwareCursor()) diff --git a/Source/engine/animationinfo.cpp b/Source/engine/animationinfo.cpp index 715b2fdcf..3af43ce0a 100644 --- a/Source/engine/animationinfo.cpp +++ b/Source/engine/animationinfo.cpp @@ -156,17 +156,15 @@ void AnimationInfo::setNewAnimation(OptionalClxSpriteList celSprite, int8_t numb relevantAnimationTicksForDistribution *= baseValueFraction; relevantAnimationTicksWithSkipping *= baseValueFraction; - // The preview animation was shown some times (less then one game tick) + // The preview animation was shown some times (less than one game tick) // So we overall have a longer time the animation is shown ticksSinceSequenceStarted_ += previewShownGameTickFragments; relevantAnimationTicksWithSkipping += previewShownGameTickFragments; // if we skipped Frames we need to expand the game ticks to make one game tick for this Animation "faster" - int32_t tickModifier; + int32_t tickModifier = 0; if (relevantAnimationTicksWithSkipping != 0) tickModifier = baseValueFraction * relevantAnimationTicksForDistribution / relevantAnimationTicksWithSkipping; - else - tickModifier = 0; // tickModifier specifies the Animation fraction per game tick, so we have to remove the delay from the variable tickModifier /= ticksPerFrame; diff --git a/Source/engine/animationinfo.h b/Source/engine/animationinfo.h index 7c6bc6c7d..ae0947f7a 100644 --- a/Source/engine/animationinfo.h +++ b/Source/engine/animationinfo.h @@ -128,7 +128,7 @@ private: */ int8_t skippedFramesFromPreviousAnimation_; /** - * @brief Specifies how many animations-fractions (see baseValueFraction) are displayed between two game ticks. this can be more then one frame, if animations are skipped or less then one frame if the same animation is shown in multiple times (delay specified). + * @brief Specifies how many animations-fractions (see baseValueFraction) are displayed between two game ticks. this can be more than one frame, if animations are skipped or less than one frame if the same animation is shown in multiple times (delay specified). */ uint16_t tickModifier_; /** diff --git a/Source/engine/demomode.cpp b/Source/engine/demomode.cpp index acf2581d2..d6680b482 100644 --- a/Source/engine/demomode.cpp +++ b/Source/engine/demomode.cpp @@ -585,13 +585,13 @@ void NotifyGameLoopEnd() HeroCompareResult compareResult = pfile_compare_hero_demo(DemoNumber, false); switch (compareResult.status) { case HeroCompareResult::ReferenceNotFound: - SDL_Log("Timedemo: No final comparision cause reference is not present."); + SDL_Log("Timedemo: No final comparison cause reference is not present."); break; case HeroCompareResult::Same: - SDL_Log("Timedemo: Same outcome as inital run. :)"); + SDL_Log("Timedemo: Same outcome as initial run. :)"); break; case HeroCompareResult::Difference: - Log("Timedemo: Different outcome then inital run. ;(\n{}", compareResult.message); + Log("Timedemo: Different outcome than initial run. ;(\n{}", compareResult.message); break; } } diff --git a/Source/items.cpp b/Source/items.cpp index 67133c328..d25dd3e34 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -4292,7 +4292,7 @@ bool GetItemRecord(int nSeed, uint16_t wCI, int nIndex) for (int i = 0; i < gnNumGetRecords; i++) { if (ticks - itemrecord[i].dwTimestamp > 6000) { - // BUGFIX: loot actions for multiple quest items with same seed (e.g. blood stone) performed within less then 6 seconds will be ignored. + // BUGFIX: loot actions for multiple quest items with same seed (e.g. blood stone) performed within less than 6 seconds will be ignored. NextItemRecord(i); i--; } else if (nSeed == itemrecord[i].nSeed && wCI == itemrecord[i].wCI && nIndex == itemrecord[i].nIndex) { diff --git a/Source/nthread.cpp b/Source/nthread.cpp index 3a2b1e6eb..d9c6eaf78 100644 --- a/Source/nthread.cpp +++ b/Source/nthread.cpp @@ -229,7 +229,7 @@ bool nthread_has_500ms_passed() } } if (resetLastTick) { - // Reset last tick to avoid caught up of all missed game ticks (game speed is dramatically increased for a short time) + // Reset last tick to avoid catching up with all missed game ticks (game speed is dramatically increased for a short time) last_tick = currentTickCount; ticksElapsed = 0; }