mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- fixed script warnings after updating to version 4.9.0
This commit is contained in:
parent
89e8d7ad58
commit
cac54d42e9
7 changed files with 20 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
|||
version "4.3"
|
||||
version "4.9"
|
||||
#include "zscript/engine/base.zs"
|
||||
#include "zscript/engine/dynarrays.zs"
|
||||
#include "zscript/engine/inputevents.zs"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
struct DynArray_I8 native
|
||||
{
|
||||
native readonly uint Size;
|
||||
native readonly int Size;
|
||||
|
||||
native void Copy(DynArray_I8 other);
|
||||
native void Move(DynArray_I8 other);
|
||||
|
@ -23,7 +23,7 @@ struct DynArray_I8 native
|
|||
|
||||
struct DynArray_I16 native
|
||||
{
|
||||
native readonly uint Size;
|
||||
native readonly int Size;
|
||||
|
||||
native void Copy(DynArray_I16 other);
|
||||
native void Move(DynArray_I16 other);
|
||||
|
@ -43,7 +43,7 @@ struct DynArray_I16 native
|
|||
|
||||
struct DynArray_I32 native
|
||||
{
|
||||
native readonly uint Size;
|
||||
native readonly int Size;
|
||||
|
||||
native void Copy(DynArray_I32 other);
|
||||
native void Move(DynArray_I32 other);
|
||||
|
@ -64,7 +64,7 @@ struct DynArray_I32 native
|
|||
|
||||
struct DynArray_F32 native
|
||||
{
|
||||
native readonly uint Size;
|
||||
native readonly int Size;
|
||||
|
||||
native void Copy(DynArray_F32 other);
|
||||
native void Move(DynArray_F32 other);
|
||||
|
@ -84,7 +84,7 @@ struct DynArray_F32 native
|
|||
|
||||
struct DynArray_F64 native
|
||||
{
|
||||
native readonly uint Size;
|
||||
native readonly int Size;
|
||||
|
||||
native void Copy(DynArray_F64 other);
|
||||
native void Move(DynArray_F64 other);
|
||||
|
@ -104,7 +104,7 @@ struct DynArray_F64 native
|
|||
|
||||
struct DynArray_Ptr native
|
||||
{
|
||||
native readonly uint Size;
|
||||
native readonly int Size;
|
||||
|
||||
native void Copy(DynArray_Ptr other);
|
||||
native void Move(DynArray_Ptr other);
|
||||
|
@ -124,7 +124,7 @@ struct DynArray_Ptr native
|
|||
|
||||
struct DynArray_Obj native
|
||||
{
|
||||
native readonly uint Size;
|
||||
native readonly int Size;
|
||||
|
||||
native void Copy(DynArray_Obj other);
|
||||
native void Move(DynArray_Obj other);
|
||||
|
@ -144,7 +144,7 @@ struct DynArray_Obj native
|
|||
|
||||
struct DynArray_String native
|
||||
{
|
||||
native readonly uint Size;
|
||||
native readonly int Size;
|
||||
|
||||
native void Copy(DynArray_String other);
|
||||
native void Move(DynArray_String other);
|
||||
|
|
|
@ -303,7 +303,7 @@ class ColorpickerMenu : OptionMenu
|
|||
}
|
||||
// Make sure the cursors stand out against similar colors
|
||||
// by pulsing them.
|
||||
blinky = abs(sin(MSTime()/1000.0)) * 0.5 + 0.5;
|
||||
blinky = abs(sin(MSTimeF()/1000.0)) * 0.5 + 0.5;
|
||||
col = Color(255, int(r*blinky), int(g*blinky), int(b*blinky));
|
||||
|
||||
screen.Clear (box_x, box_y, box_x + w, box_y + 1, col);
|
||||
|
|
|
@ -154,7 +154,7 @@ class ImageScrollerMenu : Menu
|
|||
{
|
||||
if (AnimatedTransition)
|
||||
{
|
||||
start = MSTime() * (120. / 1000.);
|
||||
start = MSTimeF() * (120. / 1000.);
|
||||
length = 30;
|
||||
dir = animtype;
|
||||
previous = current;
|
||||
|
@ -247,7 +247,7 @@ class ImageScrollerMenu : Menu
|
|||
|
||||
private bool DrawTransition()
|
||||
{
|
||||
double now = MSTime() * (120. / 1000.);
|
||||
double now = MSTimeF() * (120. / 1000.);
|
||||
if (now < start + length)
|
||||
{
|
||||
double factor = screen.GetWidth()/2;
|
||||
|
|
|
@ -64,7 +64,7 @@ class ListMenuItemBloodTextItem : ListMenuItemTextItem
|
|||
int cr = generic_ui? Font.CR_GRAY : Font.CR_NATIVEPAL;
|
||||
int trans = generic_ui? 0 : Translation.MakeID(Translation_Remap, pal);
|
||||
|
||||
if (selected) shade = 32 - ((MSTime() * 120 / 1000) & 63);
|
||||
if (selected) shade = 32 - ((int(MSTimeF()) * 120 / 1000) & 63);
|
||||
|
||||
Screen.DrawText(gamefont, Font.CR_UNTRANSLATED, xpos+1, mYpos+1, mText, DTA_Color, 0xff000000, DTA_FullscreenScale, FSMode_Fit320x200);
|
||||
Screen.DrawText(gamefont, Font.CR_NATIVEPAL, xpos, mYpos, mText, DTA_TranslationIndex, trans, DTA_Color, Raze.shadeToLight(shade), DTA_FullscreenScale, FSMode_Fit320x200);
|
||||
|
|
|
@ -60,7 +60,7 @@ class DukeMenuDelegate : RazeMenuDelegate
|
|||
|
||||
void DrawCursor(double x, double y, double scale, bool right)
|
||||
{
|
||||
uint mclock = MSTime() * 120 / 1000;
|
||||
uint mclock = uint(MSTimeF() * (120. / 1000.));
|
||||
uint frames = (gameinfo.gametype & GAMEFLAG_RRALL) ? 16 : 7;
|
||||
String picname;
|
||||
if (!right) picname= String.Format("SPINNINGNUKEICON%d", ((mclock >> 3) % frames));
|
||||
|
@ -136,8 +136,8 @@ class ListMenuItemDukeLogo : ListMenuItem
|
|||
Screen.DrawTexture(TexMan.CheckForTexture("INGAMEDUKETHREEDEE"), false, x, 29, DTA_FullscreenScale, FSMode_Fit320x200Top, DTA_CenterOffsetRel, true);
|
||||
if (gameinfo.gametype & GAMEFLAG_PLUTOPAK)
|
||||
{
|
||||
int mclock = MSTime() * 120 / 1000;
|
||||
int light = 223 + Raze.bsin(mclock<<4, -9);
|
||||
let mclock = MSTimeF() * 120 / 1000;
|
||||
int light = 223 + Raze.bsin(mclock * 16, -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);
|
||||
}
|
||||
|
@ -175,8 +175,8 @@ class ListMenuItemDukeTextItem : ListMenuItemTextItem
|
|||
|
||||
if (selected)
|
||||
{
|
||||
int mclock = MSTime() * 120 / 1000;
|
||||
int light = 231 + ((Raze.bsin(mclock<<5) * 3) >> 11);
|
||||
let mclock = MSTimeF() * 120 / 1000;
|
||||
int light = 231 + ((Raze.bsin(mclock * 32) * 3) >> 11);
|
||||
pe = Color(255, light, light, light);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -96,7 +96,7 @@ class ListMenuItemExhumedTextItem : ListMenuItemTextItem
|
|||
int width = myfont.StringWidth(mText);
|
||||
let delegate = ExhumedMenuDelegate(menuDelegate);
|
||||
double zoom = 1.;
|
||||
let now = MSTime();
|
||||
let now = MSTimeF();
|
||||
|
||||
if (delegate && (delegate.zoomsize < 1. || delegate.lastzoomsize < 1.))
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ class ExhumedMainMenu : ListMenu
|
|||
delegate.lastzoomsize = delegate.zoomsize;
|
||||
if (delegate.zoomsize < 1.)
|
||||
{
|
||||
delegate.zoomtime = MSTime();
|
||||
delegate.zoomtime = MSTimeF();
|
||||
delegate.zoomsize += 0.0625;
|
||||
if (delegate.zoomsize >= 1.)
|
||||
delegate.zoomsize = 1.;
|
||||
|
|
Loading…
Reference in a new issue