mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-12 06:50:58 +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)
|
if (gameinfo.gametype & GAMEFLAG_PLUTOPAK)
|
||||||
{
|
{
|
||||||
int mclock = MSTime() * 120 / 1000;
|
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);
|
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);
|
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)
|
if (selected)
|
||||||
{
|
{
|
||||||
int mclock = MSTime() * 120 / 1000;
|
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);
|
pe = Color(255, light, light, light);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -147,7 +147,7 @@ class DukeStatusBar : DukeCommonStatusBar
|
||||||
{
|
{
|
||||||
int s = -8;
|
int s = -8;
|
||||||
if (hud_flashing && p.last_extra > Duke.MaxPlayerHealth())
|
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);
|
int intens = clamp(255 - 6 * s, 0, 255);
|
||||||
format = String.Format("%d", p.last_extra);
|
format = String.Format("%d", p.last_extra);
|
||||||
DrawString(numberFont, format, (25, texty), DI_TEXT_ALIGN_LEFT, Font.CR_UNTRANSLATED, intens / 255., 0, 0);
|
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;
|
int s = -8;
|
||||||
if (hud_flashing && p.last_extra > Duke.MaxPlayerHealth())
|
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);
|
int intens = clamp(255 - 6 * s, 0, 255);
|
||||||
format = String.Format("%d", p.last_extra);
|
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));
|
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;
|
double y = mYpos + v.y / 2;
|
||||||
|
|
||||||
int shade;
|
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 if (Selectable()) shade = 0;
|
||||||
else shade = 25;
|
else shade = 25;
|
||||||
let color = Raze.shadeToLight(shade);
|
let color = Raze.shadeToLight(shade);
|
||||||
|
|
Loading…
Reference in a new issue