예제 #1
0
        public void InvokeThreadFunction(ScriptThread thread)
        {
            ScriptThread actionThread = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptThread;

            if (actionThread == null)
            {
                DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called InvokeThreadFunction with an invalid object.", LogAlertLevel.Error);
                return;
            }
            actionThread.InvokeFunction(thread.GetStringParameter(1), thread.GetBooleanParameter(2), thread.GetBooleanParameter(3), false);
        }
예제 #2
0
        public void StreamWriteA(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.GetBooleanParameter(1));
        }
예제 #3
0
        public void SetChannelLooping(ScriptThread thread)
        {
            ISampleBuffer sound = ((NativeObject)thread.GetObjectParameter(0)).Object as ISampleBuffer;

            if (sound == null)
            {
                DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called SetChannelLooping with an invalid object.", LogAlertLevel.Error);
                return;
            }
            sound.Looping = thread.GetBooleanParameter(1);
        }
예제 #4
0
        public void ExecuteFile(ScriptThread thread)
        {
            Process process = new Process();

            process.StartInfo.FileName    = thread.GetStringParameter(0);
            process.StartInfo.Arguments   = thread.GetStringParameter(1);
            process.StartInfo.Verb        = "Open";
            process.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
            process.Start();
            if (thread.GetBooleanParameter(2) == true)
            {
                process.WaitForExit();
            }
        }
예제 #5
0
        public void RenderPolygonB(ScriptThread thread)
        {
            int arrayIndex = thread.GetArrayParameter(0);

            if (arrayIndex == 0)
            {
                DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called RenderPolygon with an invalid object.", LogAlertLevel.Error);
                return;
            }
            int arrayLength = thread.GetArrayLength(arrayIndex);

            Vertex[] vertexs = new Vertex[(arrayLength / 3)];
            for (int i = 0; i < (arrayLength / 3); i++)
            {
                vertexs[i] = new Vertex(thread.GetFloatArrayElement(arrayIndex, (i * 3)),
                                        thread.GetFloatArrayElement(arrayIndex, (i * 3) + 1),
                                        thread.GetFloatArrayElement(arrayIndex, (i * 3) + 2));
            }

            GraphicsManager.RenderPolygon(vertexs, thread.GetBooleanParameter(1));
        }
예제 #6
0
 public void TextHeightB(ScriptThread thread)
 {
     thread.SetReturnValue(GraphicsManager.TextHeight(thread.GetStringParameter(0), thread.GetBooleanParameter(1)));
 }
예제 #7
0
 public void TextCharacterYB(ScriptThread thread)
 {
     thread.SetReturnValue(GraphicsManager.TextCharacterPosition(thread.GetStringParameter(0), thread.GetIntegerParameter(1), thread.GetBooleanParameter(2)).Y);
 }
예제 #8
0
 public void RenderBitmapTextB(ScriptThread thread)
 {
     GraphicsManager.RenderText(thread.GetStringParameter(0), thread.GetFloatParameter(1), thread.GetFloatParameter(2), thread.GetFloatParameter(3), thread.GetBooleanParameter(4));
 }
예제 #9
0
 public void RenderRectangleB(ScriptThread thread)
 {
     GraphicsManager.RenderRectangle(thread.GetFloatParameter(0), thread.GetFloatParameter(1), thread.GetFloatParameter(2), thread.GetFloatParameter(3), thread.GetFloatParameter(4), thread.GetBooleanParameter(5));
 }
예제 #10
0
 public void SetDepthBufferEnabled(ScriptThread thread)
 {
     GraphicsManager.DepthBufferEnabled = thread.GetBooleanParameter(0);
 }
예제 #11
0
 public void SetSceneGraphRender(ScriptThread thread)
 {
     Fusion.GlobalInstance.Window.RenderSceneGraph = thread.GetBooleanParameter(0);
 }