コード例 #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));
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #4
0
 public StreamScriptObject(ScriptStream stream)
 {
     _nativeObject = stream;
 }
コード例 #5
0
ファイル: IO.cs プロジェクト: HampsterEater/FusionGameEngine
 public StreamScriptObject(ScriptStream stream)
 {
     _nativeObject = stream;
 }