Beispiel #1
0
        public void StreamWriteF(ScriptThread thread)
        {
            ScriptStream stream = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptStream;

            if (stream == null)
            {
                DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called StreamWrite with an invalid object.", LogAlertLevel.Error);
                return;
            }
            stream.Writer.Write(thread.GetFloatParameter(1));
        }
Beispiel #2
0
        public void StreamLength(ScriptThread thread)
        {
            ScriptStream stream = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptStream;

            if (stream == null)
            {
                DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called StreamLength with an invalid object.", LogAlertLevel.Error);
                return;
            }
            thread.SetReturnValue(stream.Stream.Length);
        }
Beispiel #3
0
        public void StreamPeekDouble(ScriptThread thread)
        {
            ScriptStream stream = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptStream;

            if (stream == null)
            {
                DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called StreamPeekDouble with an invalid object.", LogAlertLevel.Error);
                return;
            }
            long   position = stream.Stream.Position;
            double value    = stream.Reader.ReadDouble();

            stream.Stream.Position = position;
            thread.SetReturnValue(value);
        }
Beispiel #4
0
 public StreamScriptObject(ScriptStream stream)
 {
     _nativeObject = stream;
 }
Beispiel #5
0
 public StreamScriptObject(ScriptStream stream)
 {
     _nativeObject = stream;
 }