示例#1
0
        public void PrintTimedCXY(String str, float time, byte r, byte g, byte b, byte a)
        {
            zColor  colr = zColor.Create(Process, r, g, b, a);
            zString zstr = zString.Create(Process, str);

            PrintTimedCXY(zstr, time, colr);
            colr.Dispose();
            zstr.Dispose();
        }
示例#2
0
        static void RunOutgame(RegisterMemory rmem)
        {
            try
            {
                GameTime.Update();
                GUCTimer.Update(GameTime.Ticks);

                GameTime.Update();
                GameClient.Update();

                GameTime.Update();
                InputHandler.Update();

                if (!ShowConnectionAttempts())
                {
                    if (!outgameStarted)
                    {
                        outgameStarted = true;
                        VobRenderArgs.Init();
                        ScriptManager.Interface.StartOutgame();
                    }

                    GameTime.Update();
                    ScriptManager.Interface.Update(GameTime.Ticks);
                }

                #region Gothic

                WinApi.Process.CDECLCALL <WinApi.NullReturnCall>(0x5053E0); // void __cdecl sysEvent(void)

                using (zColor color = zColor.Create(0, 0, 0, 0))
                    zCRenderer.Vid_Clear(color, 3);

                zCRenderer.BeginFrame();
                zCView.GetScreen().Render();
                zCRenderer.EndFrame();
                zCRenderer.Vid_Blit(1, 0, 0);
                zCSndSys_MSS.DoSoundUpdate();

                #endregion

                if (fpsWatch.IsRunning)
                {
                    long diff = 8 * TimeSpan.TicksPerMillisecond - fpsWatch.Elapsed.Ticks;
                    if (diff > 0)
                    {
                        Thread.Sleep((int)(diff / TimeSpan.TicksPerMillisecond));
                    }
                }
                fpsWatch.Restart();
            }
            catch (Exception e)
            {
                Logger.LogError(e);
            }
        }
示例#3
0
        private void createText()
        {
            Process process = Process.ThisProcess();
            zString str     = zString.Create(process, this.text);
            zColor  c       = zColor.Create(process, color.R, color.G, color.B, color.A);

            textView = view.PrintTimedCXY_TV(str, -1, c);
            str.Dispose();
            c.Dispose();

            textView.Timed = 0;
            textView.Timer = -1;
        }
示例#4
0
 public static void Vid_Clear(zColor color, int arg)
 {
     WinApi.Process.THISCALL <WinApi.NullReturnCall>(GetRendererAddress(), 0x00657E20, color, new WinApi.IntArg(arg));
 }
示例#5
0
 /// <summary>
 /// The PrintTimedCXY_TV-function does not clear eax so even if it does not officially return a zCViewText it should do it.
 /// </summary>
 /// <param name="str"></param>
 /// <param name="time"></param>
 /// <param name="color"></param>
 /// <returns></returns>
 public zCViewText PrintTimedCXY_TV(zString str, float time, zColor color)
 {
     return(Process.THISCALL <zCViewText>(Address, FuncAddresses.PrintTimedCXY, str, new FloatArg(time), color));
 }
示例#6
0
 public void PrintTimedCXY(zString str, float time, zColor color)
 {
     Process.THISCALL <NullReturnCall>(Address, FuncAddresses.PrintTimedCXY, str, new IntArg((int)time), color);
 }
示例#7
0
 public void PrintTimedCXY(String str, float time, byte r, byte g, byte b, byte a)
 {
     using (zColor color = zColor.Create(r, g, b, a))
         using (zString zstr = zString.Create(str))
             PrintTimedCXY(zstr, time, color);
 }
示例#8
0
 public void SetColor(zColor color)
 {
     Process.THISCALL <NullReturnCall>(Address, FuncAddresses.SetColor, color);
 }
示例#9
0
 /// <summary>
 /// The PrintTimedCXY_TV-function does not clear eax so even if it does not official returns a zCViewText it should do it.
 /// </summary>
 /// <param name="str"></param>
 /// <param name="time"></param>
 /// <param name="color"></param>
 /// <returns></returns>
 public zCViewText PrintTimedCXY_TV(zString str, float time, zColor color)
 {
     return(Process.THISCALL <zCViewText>((uint)Address, (uint)FuncOffsets.PrintTimedCXY, new CallValue[] { str, new IntArg((int)time), color }));
 }
示例#10
0
 public void PrintTimedCXY(zString str, float time, zColor color)
 {
     Process.THISCALL <NullReturnCall>((uint)Address, (uint)FuncOffsets.PrintTimedCXY, new CallValue[] { str, new IntArg((int)time), color });
 }
示例#11
0
 public void SetColor(zColor color)
 {
     Process.THISCALL <NullReturnCall>((uint)Address, (uint)FuncOffsets.SetColor, new CallValue[] { color });
 }