aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
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
commita65e818d0a8ecac47b7710e8546897e271d0ca44 (patch)
tree03d8678b4afbdfa46f7bf49ba37f0e755202aa90 /Game/Code/Screens
parent6c6f463dc99d0d5c629de4952ad45f4cc6f5a92e (diff)
downloadusdx-a65e818d0a8ecac47b7710e8546897e271d0ca44.tar.gz
usdx-a65e818d0a8ecac47b7710e8546897e271d0ca44.tar.xz
usdx-a65e818d0a8ecac47b7710e8546897e271d0ca44.zip
Fixed a bug in Note Name convertation
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@297 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-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';