aboutsummaryrefslogtreecommitdiffstats
path: root/us_maker_edition/src/base/USong.pas
diff options
context:
space:
mode:
Diffstat (limited to 'us_maker_edition/src/base/USong.pas')
-rw-r--r--us_maker_edition/src/base/USong.pas34
1 files changed, 17 insertions, 17 deletions
diff --git a/us_maker_edition/src/base/USong.pas b/us_maker_edition/src/base/USong.pas
index a441fe40..e92c5b45 100644
--- a/us_maker_edition/src/base/USong.pas
+++ b/us_maker_edition/src/base/USong.pas
@@ -179,9 +179,6 @@ uses
UMusic, //needed for Lines
UNote; //needed for Player
-const
- DEFAULT_ENCODING = encAuto;
-
constructor TSong.Create();
begin
inherited;
@@ -510,22 +507,25 @@ begin
//Check for ZeroNote
if Param2 = 0 then
+ begin
Log.LogWarn(Format('"%s" in line %d: %s',
- [FileNamePath.ToNative, FileLineNo, 'found note with length zero -> note ignored']), 'TSong.LoadSong')
+ [FileNamePath.ToNative, FileLineNo,
+ 'found note with length zero -> converted to FreeStyle']),
+ 'TSong.LoadSong');
//Log.LogError('Found zero-length note at "'+Param0+' '+IntToStr(Param1)+' '+IntToStr(Param2)+' '+IntToStr(Param3)+ParamLyric+'" -> Note ignored!')
+ Param0 := 'F';
+ end;
+
+ // add notes
+ if not Both then
+ // P1
+ ParseNote(0, Param0, (Param1+Rel[0]) * Mult, Param2 * Mult, Param3, ParamLyric)
else
begin
- // add notes
- if not Both then
- // P1
- ParseNote(0, Param0, (Param1+Rel[0]) * Mult, Param2 * Mult, Param3, ParamLyric)
- else
- begin
- // P1 + P2
- ParseNote(0, Param0, (Param1+Rel[0]) * Mult, Param2 * Mult, Param3, ParamLyric);
- ParseNote(1, Param0, (Param1+Rel[1]) * Mult, Param2 * Mult, Param3, ParamLyric);
- end;
- end; //Zeronote check
+ // P1 + P2
+ ParseNote(0, Param0, (Param1+Rel[0]) * Mult, Param2 * Mult, Param3, ParamLyric);
+ ParseNote(1, Param0, (Param1+Rel[1]) * Mult, Param2 * Mult, Param3, ParamLyric);
+ end;
end // if
else if Param0 = '-' then
@@ -1087,7 +1087,7 @@ begin
// File encoding
else if (Identifier = 'ENCODING') then
begin
- self.Encoding := ParseEncoding(Value, DEFAULT_ENCODING);
+ self.Encoding := ParseEncoding(Value, Ini.DefaultEncoding);
end
// unsupported tag
@@ -1236,7 +1236,7 @@ begin
Year := 0;
// set to default encoding
- Encoding := DEFAULT_ENCODING;
+ Encoding := Ini.DefaultEncoding;
// clear custom header tags
SetLength(CustomTags, 0);