From 410c2cf41fd993a86cbf5dc99d3b6dc8453e1039 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 15 Nov 2020 15:14:47 +1100 Subject: [PATCH] - buildutils: Replace `sintable[]` use within Duke's sbar_*.cpp with `bsin()`/`bcos()`. --- source/games/duke/src/sbar_d.cpp | 2 +- source/games/duke/src/sbar_r.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/sbar_d.cpp b/source/games/duke/src/sbar_d.cpp index 06de50fec..72a9e1142 100644 --- a/source/games/duke/src/sbar_d.cpp +++ b/source/games/duke/src/sbar_d.cpp @@ -137,7 +137,7 @@ public: { int s = -8; if (althud_flashing && p->last_extra > max_player_health) - s += (sintable[(I_GetBuildTime() << 5) & 2047] / 768); + s += bsin(I_GetBuildTime() << 5) / 768; int intens = clamp(255 - 6 * s, 0, 255); format.Format("%d", p->last_extra); SBar_DrawString(this, numberFont, format, 25, texty, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, intens / 255., 0, 0, 1, 1); diff --git a/source/games/duke/src/sbar_r.cpp b/source/games/duke/src/sbar_r.cpp index 24bc5417c..41cd9fdd7 100644 --- a/source/games/duke/src/sbar_r.cpp +++ b/source/games/duke/src/sbar_r.cpp @@ -112,7 +112,7 @@ public: { int s = -8; if (althud_flashing && p->last_extra > max_player_health) - s += (sintable[(I_GetBuildTime() << 5) & 2047] / 768); + s += bsin(I_GetBuildTime() << 5) / 768; int intens = clamp(255 - 6 * s, 0, 255); format.Format("%d", p->last_extra); SBar_DrawString(this, numberFont, format, 26.5, -numberFont->mFont->GetHeight() * scale + 4, DI_TEXT_ALIGN_LEFT, CR_UNTRANSLATED, intens / 255., 0, 0, scale, scale);