From b680e3fef1cf649969b01058b138f43360db82d3 Mon Sep 17 00:00:00 2001 From: ephphatha Date: Fri, 9 Jul 2021 21:25:29 +1000 Subject: [PATCH] Align end comment markers for doxygen comments Including a bunch from previous PRs (since I was responsible for the broken formatting for most :sweat:) --- Source/controls/modifier_hints.cpp | 2 +- Source/engine.cpp | 2 +- Source/engine/render/text_render.hpp | 4 ++-- Source/missiles.cpp | 2 +- Source/objects.h | 4 ++-- Source/utils/math.h | 8 ++++---- Source/utils/soundsample.h | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Source/controls/modifier_hints.cpp b/Source/controls/modifier_hints.cpp index bd994d1f6..42531bfbb 100644 --- a/Source/controls/modifier_hints.cpp +++ b/Source/controls/modifier_hints.cpp @@ -103,7 +103,7 @@ uint16_t CircleMenuHintTextColor(bool active) * @param out The output buffer to draw on. * @param hint Struct describing the text to draw and the dimensions of the layout. * @param origin Top left corner of the layout (relative to the output buffer). -*/ + */ void DrawCircleMenuHint(const Surface &out, const CircleMenuHint &hint, const Point &origin) { DrawString(out, hint.top, origin + Displacement { hint.xMid - hint.topW / 2, 0 }, CircleMenuHintTextColor(IsTopActive(hint))); diff --git a/Source/engine.cpp b/Source/engine.cpp index 045d23ac7..ae1eeadc8 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -136,7 +136,7 @@ void DrawHalfTransparentRectTo(const Surface &out, int sx, int sy, int width, in * @param x2 the x coordinate of p2 * @param y2 the y coordinate of p2 * @return the direction of the p1->p2 vector -*/ + */ Direction GetDirection(Point start, Point destination) { Direction md = DIR_S; diff --git a/Source/engine/render/text_render.hpp b/Source/engine/render/text_render.hpp index 87b13d1e6..85cdb1dbd 100644 --- a/Source/engine/render/text_render.hpp +++ b/Source/engine/render/text_render.hpp @@ -57,7 +57,7 @@ void WordWrapGameString(char *text, size_t width, GameFontTables size = GameFont * @param lineHeight Allows overriding the default line height, useful for multi-line strings. * @param drawTextCursor Whether to draw an animated cursor sprite at the end of the text (default is to display nothing). * @return The number of characters rendered, including characters "drawn" outside the buffer. -*/ + */ uint16_t DrawString(const Surface &out, const char *text, const Rectangle &rect, uint16_t flags = 0, int spacing = 1, int lineHeight = -1, bool drawTextCursor = false); /** @@ -77,7 +77,7 @@ uint16_t DrawString(const Surface &out, const char *text, const Rectangle &rect, * @param lineHeight Allows overriding the default line height, useful for multi-line strings. * @param drawTextCursor Whether to draw an animated cursor sprite at the end of the text (default is to display nothing). * @return The number of characters rendered (could be less than the string length if it wrapped past the bottom of the buffer). -*/ + */ inline uint16_t DrawString(const Surface &out, const char *text, const Point &position, uint16_t flags = 0, int spacing = 1, int lineHeight = -1, bool drawTextCursor = false) { return DrawString(out, text, { position, { out.w() - position.x, 0 } }, flags, spacing, lineHeight, drawTextCursor); diff --git a/Source/missiles.cpp b/Source/missiles.cpp index 041f6db60..c945a846e 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -259,7 +259,7 @@ constexpr Direction16 Direction16Flip(Direction16 x, Direction16 pivot) * @param x2 the x coordinate of p2 * @param y2 the y coordinate of p2 * @return the direction of the p1->p2 vector -*/ + */ Direction16 GetDirection16(Point p1, Point p2) { Displacement offset = p2 - p1; diff --git a/Source/objects.h b/Source/objects.h index 11365a099..69c043451 100644 --- a/Source/objects.h +++ b/Source/objects.h @@ -76,7 +76,7 @@ void AddNakrulBook(int a1, int a2, int a3); * @brief Spawns an object of the given type at the map coordinates provided * @param objType Type specifier * @param objPos tile coordinates -*/ + */ void AddObject(_object_id objType, Point objPos); void Obj_Trap(int i); void ProcessObjects(); @@ -106,7 +106,7 @@ void AddNakrulLeaver(); * * @param s the id of the spell tome * @return true if the player has activated all three tomes in the correct order, false otherwise -*/ + */ bool OperateNakrulBook(int s); bool objectIsDisabled(int i); diff --git a/Source/utils/math.h b/Source/utils/math.h index 8f17186f6..513d9e427 100644 --- a/Source/utils/math.h +++ b/Source/utils/math.h @@ -13,7 +13,7 @@ namespace math { * @tparam T Any arithmetic type * @param t Value to compute sign of * @return -1 if t < 0, 1 if t > 0, 0 if t == 0 -*/ + */ template int Sign(T t) { @@ -28,7 +28,7 @@ int Sign(T t) * @param b High interpolation value (returned when t == 1) * @param t Interpolator, commonly in range [0..1], values outside this range will extrapolate * @return a + (b - a) * t -*/ + */ template V Lerp(V a, V b, T t) { @@ -42,7 +42,7 @@ V Lerp(V a, V b, T t) * @param b High key value (function returns 1 if v == b) * @param v Mixing factor, commonly in range [a..b] to get a return [0..1] * @return Value t so that v = Lerp(a, b, t); or 0 if b == a -*/ + */ template T InvLerp(T a, T b, T v) { @@ -61,7 +61,7 @@ T InvLerp(T a, T b, T v) * @param outMax Second bound of output range * @param v Value to remap * @return Transformed value so that InvLerp(inMin, inMax, v) == InvLerp(outMin, outMax, return) -*/ + */ template T Remap(T inMin, T inMax, T outMin, T outMax, T v) { diff --git a/Source/utils/soundsample.h b/Source/utils/soundsample.h index 58d27188f..398654919 100644 --- a/Source/utils/soundsample.h +++ b/Source/utils/soundsample.h @@ -16,7 +16,7 @@ namespace devilution { * @param logMin Volume range minimum (usually ATTENUATION_MIN for game sounds and VOLUME_MIN for volume sliders) * @param logMax Volume range maximum (usually 0) * @return Linear volume in the range [0..1] -*/ + */ float VolumeLogToLinear(int logVolume, int logMin, int logMax); class SoundSample final {