Skip to content

Commit

Permalink
Added CPU ticks for Williams CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
james-wallace-ghub committed Jun 3, 2020
1 parent ae0d589 commit 1f85acc
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 32 deletions.
32 changes: 16 additions & 16 deletions src/OKI_Editor/MainDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 34 additions & 16 deletions src/OKI_Editor/MainDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,9 @@ private void UpdateCtrl0()
Banks[0].samples[i].depends.Clear();
B0_Depends[i].Text = "";
B0_Offset[i].Text = "0x" + Banks[0].samples[i].offset.ToString("x");
B0_Length[i].Text = "0x" + Banks[0].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[0].samples[i].length * 0.13);

B0_Length[i].Text = "0x" + Banks[0].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}
}
}
Expand All @@ -368,7 +370,8 @@ private void UpdateCtrl2()
Banks[2].samples[i].depends.Clear();
B2_Depends[i].Text = "";
B2_Offset[i].Text = "0x" + Banks[2].samples[i].offset.ToString("x");
B2_Length[i].Text = "0x" + Banks[2].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[2].samples[i].length * 0.13);
B2_Length[i].Text = "0x" + Banks[2].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}
}
}
Expand All @@ -381,7 +384,9 @@ private void UpdateCtrl3()
Banks[3].samples[i].depends.Clear();
B3_Depends[i].Text = "";
B3_Offset[i].Text = "0x" + Banks[3].samples[i].offset.ToString("x");
B3_Length[i].Text = "0x" + Banks[3].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[3].samples[i].length * 0.13);
B3_Length[i].Text = "0x" + Banks[3].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");

}
}
}
Expand All @@ -394,7 +399,8 @@ private void UpdateCtrl4()
Banks[4].samples[i].depends.Clear();
B4_Depends[i].Text = "";
B4_Offset[i].Text = "0x" + Banks[4].samples[i].offset.ToString("x");
B4_Length[i].Text = "0x" + Banks[4].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[4].samples[i].length * 0.13);
B4_Length[i].Text = "0x" + Banks[4].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}
}
}
Expand All @@ -407,7 +413,8 @@ private void UpdateCtrl5()
Banks[5].samples[i].depends.Clear();
B5_Depends[i].Text = "";
B5_Offset[i].Text = "0x" + Banks[5].samples[i].offset.ToString("x");
B5_Length[i].Text = "0x" + Banks[5].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[5].samples[i].length * 0.13);
B5_Length[i].Text = "0x" + Banks[5].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}
}
}
Expand All @@ -420,7 +427,8 @@ private void UpdateCtrl6()
Banks[6].samples[i].depends.Clear();
B6_Depends[i].Text = "";
B6_Offset[i].Text = "0x" + Banks[6].samples[i].offset.ToString("x");
B6_Length[i].Text = "0x" + Banks[6].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[6].samples[i].length * 0.13);
B6_Length[i].Text = "0x" + Banks[6].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}
}
}
Expand All @@ -433,7 +441,8 @@ private void UpdateCtrl7()
Banks[7].samples[i].depends.Clear();
B7_Depends[i].Text = "";
B7_Offset[i].Text = "0x" + Banks[7].samples[i].offset.ToString("x");
B7_Length[i].Text = "0x" + Banks[7].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[7].samples[i].length * 0.13);
B7_Length[i].Text = "0x" + Banks[7].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}
}
}
Expand All @@ -447,7 +456,8 @@ private void UpdateCtrlCOM()
smp.depends.Clear();
BCOM_Depends[i].Text = "";
BCOM_Offset[i].Text = "0x" + smp.offset.ToString("x");
BCOM_Length[i].Text = "0x" + smp.length.ToString("x");
int ticks = (int)(smp.length * 0.13);
BCOM_Length[i].Text = "0x" + smp.length.ToString("x") + ",0x" +ticks.ToString("x");
}
i++;
}
Expand Down Expand Up @@ -518,7 +528,8 @@ private void SetCtrl0()
}
B0_Depends[i].Text = deps;
B0_Offset[i].Text = "0x" + Banks[0].samples[i].offset.ToString("x");
B0_Length[i].Text = "0x" + Banks[0].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[0].samples[i].length * 0.13);
B0_Length[i].Text = "0x" + Banks[0].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}

}
Expand Down Expand Up @@ -590,7 +601,8 @@ private void SetCtrl2()
}
B2_Depends[i].Text = deps;
B2_Offset[i].Text = "0x" + Banks[2].samples[i].offset.ToString("x");
B2_Length[i].Text = "0x" + Banks[2].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[2].samples[i].length * 0.13);
B2_Length[i].Text = "0x" + Banks[2].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}

}
Expand Down Expand Up @@ -662,7 +674,8 @@ private void SetCtrl3()
}
B3_Depends[i].Text = deps;
B3_Offset[i].Text = "0x" + Banks[3].samples[i].offset.ToString("x");
B3_Length[i].Text = "0x" + Banks[3].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[3].samples[i].length * 0.13);
B3_Length[i].Text = "0x" + Banks[3].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}

}
Expand Down Expand Up @@ -734,7 +747,8 @@ private void SetCtrl4()
}
B4_Depends[i].Text = deps;
B4_Offset[i].Text = "0x" + Banks[4].samples[i].offset.ToString("x");
B4_Length[i].Text = "0x" + Banks[4].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[4].samples[i].length * 0.13);
B4_Length[i].Text = "0x" + Banks[4].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}

}
Expand Down Expand Up @@ -806,7 +820,8 @@ private void SetCtrl5()
}
B5_Depends[i].Text = deps;
B5_Offset[i].Text = "0x" + Banks[5].samples[i].offset.ToString("x");
B5_Length[i].Text = "0x" + Banks[5].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[5].samples[i].length * 0.13);
B5_Length[i].Text = "0x" + Banks[5].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}

}
Expand Down Expand Up @@ -878,7 +893,8 @@ private void SetCtrl6()
}
B6_Depends[i].Text = deps;
B6_Offset[i].Text = "0x" + Banks[6].samples[i].offset.ToString("x");
B6_Length[i].Text = "0x" + Banks[6].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[6].samples[i].length * 0.13);
B6_Length[i].Text = "0x" + Banks[6].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}

}
Expand Down Expand Up @@ -950,7 +966,8 @@ private void SetCtrl7()
}
B7_Depends[i].Text = deps;
B7_Offset[i].Text = "0x" + Banks[7].samples[i].offset.ToString("x");
B7_Length[i].Text = "0x" + Banks[7].samples[i].length.ToString("x");
int ticks = (int)Math.Round(Banks[7].samples[i].length * 0.13);
B7_Length[i].Text = "0x" + Banks[7].samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}

}
Expand Down Expand Up @@ -1004,7 +1021,8 @@ private void SetCtrlCOM()
}
BCOM_Depends[i].Text = deps;
BCOM_Offset[i].Text = "0x" + CommonBank.samples[i].offset.ToString("x");
BCOM_Length[i].Text = "0x" + CommonBank.samples[i].length.ToString("x");
int ticks = (int)Math.Round(CommonBank.samples[i].length * 0.13);
BCOM_Length[i].Text = "0x" + CommonBank.samples[i].length.ToString("x") + ",0x" +ticks.ToString("x");
}
i++;
}
Expand Down

0 comments on commit 1f85acc

Please sign in to comment.