mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 13:10:39 +00:00
- Fix up bsin()
usage within ZScript files.
This commit is contained in:
parent
e699c264f0
commit
9d3d8e747c
4 changed files with 5 additions and 5 deletions
|
@ -137,7 +137,7 @@ class ListMenuItemDukeLogo : ListMenuItem
|
|||
if (gameinfo.gametype & GAMEFLAG_PLUTOPAK)
|
||||
{
|
||||
int mclock = MSTime() * 120 / 1000;
|
||||
int light = 223 + (Raze.bsin(mclock<<4) >> 9);
|
||||
int light = 223 + Raze.bsin(mclock<<4, -9);
|
||||
let pe = Color(255, light, light, light);
|
||||
Screen.DrawTexture(TexMan.CheckForTexture("MENUPLUTOPAKSPRITE"), false, x + 100, 36, DTA_FullscreenScale, FSMode_Fit320x200Top, DTA_Color, pe, DTA_CenterOffsetRel, true);
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ class ListMenuItemDukeTextItem : ListMenuItemTextItem
|
|||
if (selected)
|
||||
{
|
||||
int mclock = MSTime() * 120 / 1000;
|
||||
int light = 231 + (Raze.bsin(mclock<<5) >> 9);
|
||||
int light = 231 + ((Raze.bsin(mclock<<5) * 3) >> 11);
|
||||
pe = Color(255, light, light, light);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -147,7 +147,7 @@ class DukeStatusBar : DukeCommonStatusBar
|
|||
{
|
||||
int s = -8;
|
||||
if (hud_flashing && p.last_extra > Duke.MaxPlayerHealth())
|
||||
s += Raze.bsin(Raze.GetBuildTime() << 5) / 768;
|
||||
s += Raze.bsin(Raze.GetBuildTime() << 5, -10);
|
||||
int intens = clamp(255 - 6 * s, 0, 255);
|
||||
format = String.Format("%d", p.last_extra);
|
||||
DrawString(numberFont, format, (25, texty), DI_TEXT_ALIGN_LEFT, Font.CR_UNTRANSLATED, intens / 255., 0, 0);
|
||||
|
|
|
@ -94,7 +94,7 @@ class RedneckStatusBar : DukeCommonStatusBar
|
|||
{
|
||||
int s = -8;
|
||||
if (hud_flashing && p.last_extra > Duke.MaxPlayerHealth())
|
||||
s += Raze.bsin(Raze.GetBuildTime() << 5) / 768;
|
||||
s += Raze.bsin(Raze.GetBuildTime() << 5, -10);
|
||||
int intens = clamp(255 - 6 * s, 0, 255);
|
||||
format = String.Format("%d", p.last_extra);
|
||||
DrawString(numberFont, format, (26.5, -numberFont.mFont.GetHeight() * scale + 4), DI_TEXT_ALIGN_LEFT, Font.CR_UNTRANSLATED, intens / 255., 0, 0, (scale, scale));
|
||||
|
|
|
@ -101,7 +101,7 @@ class ListMenuItemExhumedTextItem : ListMenuItemTextItem
|
|||
double y = mYpos + v.y / 2;
|
||||
|
||||
int shade;
|
||||
if (selected) shade = Raze.bsin(MSTime() * 16 * 120 / 1000) >> 9;
|
||||
if (selected) shade = Raze.bsin(MSTime() * 16 * 120 / 1000, -9);
|
||||
else if (Selectable()) shade = 0;
|
||||
else shade = 25;
|
||||
let color = Raze.shadeToLight(shade);
|
||||
|
|
Loading…
Reference in a new issue