예제 #1
0
        public unsafe CameraInfoV1 GetCameraInfoV1()
        {
            CameraInfoV1 result = new CameraInfoV1();

            if (Pointers[PointerType.CameraInfo].Address == IntPtr.Zero)
            {
                return(result);
            }

            try
            {
                byte[] source = GetByteArray(Pointers[PointerType.CameraInfo].Address, 1024);
                if (source == null || source.Length == 0)
                {
                    return(result);
                }

                fixed(byte *p = source)
                {
                    result.Mode      = p[0x174];
                    result.Heading   = *(Single *)&p[0x134];
                    result.Elevation = *(Single *)&p[0x138];
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
            }

            return(result);
        }
예제 #2
0
        private void UpdateCameraInfo(object sender, EventArgs e)
        {
            IActPluginV1 plugin = GetFFXIVMemoryReaderPlugin();

            if (plugin != null)
            {
                dynamic memoryPlugin = plugin;

                CameraInfoV1 cameraInfo = memoryPlugin?.GetCameraInfoV1();
                if (cameraInfo != null)
                {
                    textBox_Camera_Mode.Text      = cameraInfo.Mode.ToString();
                    textBox_Camera_Heading.Text   = cameraInfo.Heading.ToString();
                    textBox_Camera_Elevation.Text = cameraInfo.Elevation.ToString();
                }
            }
            plugin = null;
        }