Exemple #1
0
 private void GlControl_Map_Resize(object sender, EventArgs e)
 {
     HelperOpenGL.GlControl_Refresh(openglControlMap);
 }
Exemple #2
0
        private void RenderTimerTick(object source, ElapsedEventArgs e)
        {
            if (Settings.DemoMode)
            {
                // Force repaint event.
                if (renderMapComplete)
                {
                    renderMapComplete = false;

                    HelperOpenGL.GlControl_Refresh(openglControlMap);
                    RenderOverlay();
                }
            }

            ThreadHelper.SetText(this, textBoxAddressBase, reader.GameBaseAddress.ToString("X"));
            ThreadHelper.SetText(this, textBoxAddressGameWorld, reader.GameWorldPointer.ToString("X"));
            ThreadHelper.SetText(this, textBoxAddressLocalGameWorld, reader.LocalGameWorldPointer.ToString("X"));
            ThreadHelper.SetText(this, textBoxFPSCamera, reader.CameraPointer.ToString("X"));
            ThreadHelper.SetText(this, textBoxPID, Settings.GamePIDCurrent.ToString());

            if (Settings.MapCenterMap && !mouseFormButtonDown)
            {
                myCoordForMapCenterX = (int)Math.Round(Helper.myPosXingame) * Settings.MapZoomLevelFromZoomLevels * openglInvertMap;
                myCoordForMapCenterY = (int)Math.Round(Helper.myPosZingame) * Settings.MapZoomLevelFromZoomLevels * openglInvertMap;

                openglControlMapDragOffsetX          = (int)Math.Round(myCoordForMapCenterX * -1);
                openglControlMapDragOffsetY          = (int)Math.Round(myCoordForMapCenterY * -1);
                openglControlMapMouseDragOffsetTempX = openglControlMapDragOffsetX;
                openglControlMapMouseDragOffsetTempY = openglControlMapDragOffsetY;
            }

            // Aggressive Mode
            if (Aggressive.PlayerTargetsListEquipmentViewNeedsUpdate)
            {
                listViewEquipment.Invoke(new Action(() =>
                {
                    listViewEquipment.Items.Clear();

                    for (int i = Aggressive.PlayerTargetsDictEquipment.Count - 1; i >= 0; i--)
                    {
                        string[] listEntry    = new string[3];
                        listEntry[0]          = Aggressive.PlayerTargetsDictEquipment.ElementAt(i).Value;
                        listEntry[1]          = Aggressive.PlayerTargetsDictEquipment.ElementAt(i).Key.ToString();
                        listEntry[2]          = Aggressive.PlayerTargetsDictProfile.ElementAt(i).Key.ToString();
                        ListViewItem listItem = new ListViewItem(listEntry);
                        listViewEquipment.Items.Add(listItem);
                    }
                }));

                Aggressive.PlayerTargetsListEquipmentViewNeedsUpdate = false;
            }

            // Force repaint event.
            if (HelperOpenGL.PlayerListToRenderComplete)
            {
                HelperOpenGL.PlayerListToRenderFinal.Clear();
                HelperOpenGL.PlayerListToRenderFinal.AddRange(HelperOpenGL.PlayerListToRenderPre);
                HelperOpenGL.PlayerListToRenderComplete = false;
                if (HelperOpenGL.LootListToRenderComplete)
                {
                    HelperOpenGL.LootListToRenderFinal.Clear();
                    HelperOpenGL.LootListToRenderFinal.AddRange(HelperOpenGL.LootListToRenderPre);
                    HelperOpenGL.LootListToRenderComplete = false;
                }

                HelperOpenGL.GlControl_Refresh(openglControlMap);
                RenderOverlay();
            }

            if (buttonStartStop.Text == "Stop")
            {
                renderTimer.Start();
            }
        }