From a65e818d0a8ecac47b7710e8546897e271d0ca44 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Sun, 15 Jul 2007 17:21:12 +0000 Subject: 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 --- Game/Code/Screens/UScreenEditSub.pas | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Game/Code/Screens') 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'; -- cgit v1.2.3