private void SendTouch(float x, float y, int state) { try { if (Manipulator.ReadInt32(TOUCH_PANEL_CONNECTION_STATE) != 1) { Manipulator.WriteInt32(TOUCH_PANEL_CONNECTION_STATE, 1); } if (_isTouching) { var mousePos = new POINT((int)x, (int)y); var relPos = Manipulator.GetMouseRelativePos(mousePos); Manipulator.WriteSingle(TOUCH_PANEL_X_POSITION, relPos.X); Manipulator.WriteSingle(TOUCH_PANEL_Y_POSITION, relPos.Y); } Manipulator.WriteInt32(TOUCH_PANEL_CONTACT_TYPE, state); float pressure = state != 0 ? 1 : 0; Manipulator.WriteSingle(TOUCH_PANEL_PRESSURE, pressure); } catch (Exception) { Stop(); } }
public void Update() { Manipulator.GetClientRect(Manipulator.AttachedProcess.MainWindowHandle, out RECT hWindow); if (hWindow.Equals(lhWindow)) { return; } var uiWidth = hWindow.Right - hWindow.Left; var uiHeight = hWindow.Bottom - hWindow.Top; if (uiWidth == 0 || uiHeight == 0) { return; } Manipulator.WriteSingle(UI_ASPECT_RATIO, (float)(uiWidth) / (float)(uiHeight)); Manipulator.WriteDouble(FB_ASPECT_RATIO, (double)(uiWidth) / (double)(uiHeight)); Manipulator.WriteSingle(UI_WIDTH_ADDRESS, uiWidth); Manipulator.WriteSingle(UI_HEIGHT_ADDRESS, uiHeight); Manipulator.WriteInt32(FB1_WIDTH_ADDRESS, uiWidth); Manipulator.WriteInt32(FB1_HEIGHT_ADDRESS, uiHeight); var resWidth = Manipulator.ReadInt32(0x0000000140EDA8BC); var resHeight = Manipulator.ReadInt32(0x0000000140EDA8C0); Manipulator.WriteInt32(0x00000001411AD608, 0); // Set that f*****g whatever shitty checking flag to 0 Manipulator.WriteInt32(0x0000000140EDA8E4, resWidth); // RESOLUTION_WIDTH Manipulator.WriteInt32(0x0000000140EDA8E8, resHeight); // RESOLUTION_HEIGHT Manipulator.WriteSingle(0x00000001411A1900, 0); // WTF FROGGY? 0x00000001411A1870 + 0x90 Manipulator.WriteSingle(0x00000001411A1904, (float)resWidth); // RESOLUTION_WIDTH Manipulator.WriteSingle(0x00000001411A1908, (float)resHeight); // RESOLUTION_HEIGHT lhWindow = hWindow; }
private void SavePlayerData() { playerData.VocaloidPoint = Manipulator.ReadInt32(PLAYER_VP_ADDRESS); playerData.ActToggle = Manipulator.ReadByte(PLAYER_ACT_TOGGLE_ADDRESS); playerData.ActVol = Manipulator.ReadInt32(PLAYER_ACT_VOL_ADDRESS);; playerData.ActSlideVol = Manipulator.ReadInt32(PLAYER_ACT_SLVOL_ADDRESS); playerData.HpVol = Manipulator.ReadInt32(PLAYER_HP_VOL_ADDRESS); playerData.PvSortKind = Manipulator.ReadInt32(PLAYER_PV_SORT_KIND_ADDRESS); // if (playerData.SetPlayData) playerData.PlayDataId = playIdx; // Write to file var serializer = new XmlSerializer(typeof(PlayerData)); using (var writer = new StreamWriter(PLAYER_DATA_PATH)) { serializer.Serialize(writer, playerData); writer.Close(); } if (divaScore != null) { divaScore.SavePlayerScoreData(); } }
internal void SaveCurrentPvSetting(int pvId) { if (!isInitialized) { return; } var diff = Manipulator.ReadInt32(GAME_INFO_ADDRESS); var ed = Manipulator.ReadInt32(GAME_INFO_ADDRESS + 4); var moduleEquipCmn = Manipulator.ReadInt32Array(PLAYER_CMN_MODULE_EQUIP_ADDRESS, 6); var itemEquipCmn = Manipulator.ReadInt32Array(PLAYER_CMN_ITEM_EQUIP_ADDRESS, 24); playerExData.ModuleEquip = moduleEquipCmn; playerExData.ItemEquip = itemEquipCmn; var cached = GetCachedScore(pvId, diff, ed); var exdata = playerExData.GetPvSetting(pvId); exdata.ModuleEquip = cached.Modules; exdata.ItemEquip = cached.Items; playerExData.UpdatePvSetting(exdata); SavePlayerExData(); }