From 3c3cdc45902ed1748c501ae82247c01b56dfdfb7 Mon Sep 17 00:00:00 2001 From: Suuper Date: Thu, 23 Jul 2015 13:30:25 -0500 Subject: [PATCH] Fixed a display bug cauased by player highlighting (also renamed a variable and changed comment lines) --- .../movie/conversions/MovieConversionExtensions.cs | 5 +++-- .../movie/tasproj/TasStateManager.cs | 12 ++++++------ BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs b/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs index 9db44e8e5c..480dffc788 100644 --- a/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs +++ b/BizHawk.Client.Common/movie/conversions/MovieConversionExtensions.cs @@ -148,9 +148,10 @@ namespace BizHawk.Client.Common.MovieConversionExtensions tas.CopyVerificationLog(old.VerificationLog); tas.CopyVerificationLog(entries.Take(frame)); - // States: TODO + // States can't be easily moved over, because they contain the frame number. + // TODO? I'm not sure how this would be done. - // Lag Log: TODO + // Lag Log tas.TasLagLog.FromLagLog(old.TasLagLog); tas.TasLagLog.StartFromFrame(frame); diff --git a/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs b/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs index e0d1f1a1eb..ccf7a4ea6c 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs @@ -276,19 +276,19 @@ namespace BizHawk.Client.Common } StateAccessed(frame); } - private void RemoveState(int index) + private void RemoveState(int frame) { - if (States[index] == null) + if (States[frame] == null) { DiskUsed -= _expectedStateSize; // Disk length? - string path = Path.Combine(statePath, index.ToString()); + string path = Path.Combine(statePath, frame.ToString()); File.Delete(path); } else - Used -= (ulong)States[index].Length; - States.RemoveAt(States.IndexOfKey(index)); + Used -= (ulong)States[frame].Length; + States.RemoveAt(States.IndexOfKey(frame)); - accessed.Remove(index); + accessed.Remove(frame); } private void StateAccessed(int index) { diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs index 7c02f242d6..3e858c54dc 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs @@ -1339,7 +1339,7 @@ namespace BizHawk.Client.EmuHawk QueryItemBkColor(f + startRow, columns[j], ref itemColor); if (itemColor == Color.White) itemColor = rowColor; - else if (itemColor.A != 255) + else if (itemColor.A != 255 && itemColor.A != 0) { float alpha = (float)itemColor.A / 255; itemColor = Color.FromArgb(rowColor.R - (int)((rowColor.R - itemColor.R) * alpha),