aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-07-15 17:21:12 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-07-15 17:21:12 +0000
commit776361f0444627266a8fd398024c28b5bb10ae36 (patch)
tree05ac8f21d6e2e4796dce4fa4b86b9e2cef6fdad6
parent9471a308f070043e5da08e81235ebae0045be2bf (diff)
downloadusdx-776361f0444627266a8fd398024c28b5bb10ae36.tar.gz
usdx-776361f0444627266a8fd398024c28b5bb10ae36.tar.xz
usdx-776361f0444627266a8fd398024c28b5bb10ae36.zip
Fixed a bug in Note Name convertation
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0x@297 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas14
1 files changed, 12 insertions, 2 deletions
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index 9e84462d..9ca45f55 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -1291,8 +1291,18 @@ end;
function TScreenEditSub.GetNoteName(Note: Integer): String;
var N1, N2: Integer;
begin
- N1 := Note mod 12;
- N2 := Note div 12;
+ if (Note > 0) then
+ begin
+ N1 := Note mod 12;
+ N2 := Note div 12;
+ end
+ else
+ begin
+ N1 := (Note + (-Trunc(Note/12)+1)*12) mod 12;
+ N2 := -1;
+ end;
+
+
case N1 of
0: Result := 'c';