aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-02-28 21:09:28 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-02-28 21:09:28 +0000
commit4ec8eae5229e26b8ee648f5168d9b9c7f4e154eb (patch)
treea167c7d6fd49f912deba57be86cf30b48f9dc622
parent4871039f6f1b55f867e2780013bd10ad16aeaa41 (diff)
downloadusdx-4ec8eae5229e26b8ee648f5168d9b9c7f4e154eb.tar.gz
usdx-4ec8eae5229e26b8ee648f5168d9b9c7f4e154eb.tar.xz
usdx-4ec8eae5229e26b8ee648f5168d9b9c7f4e154eb.zip
load song with "note length"-error anyway;
added option "LoadFaultySongs" (for song devs) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2163 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Game/Code/Classes/UFiles.pas20
-rw-r--r--Game/Code/Classes/UIni.pas11
-rw-r--r--Game/Code/UltraStar.dpr2
3 files changed, 25 insertions, 8 deletions
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas
index b3b6e3fd..6e552f40 100644
--- a/Game/Code/Classes/UFiles.pas
+++ b/Game/Code/Classes/UFiles.pas
@@ -663,7 +663,8 @@ begin
if(numLines=0) then
begin
Log.LogError('Song ' + AktSong.Path + AktSong.Filename + ' has no lines?');
- Exit;
+ if (Ini.LoadFaultySongs=0) then
+ Exit;
end;
for line := 0 to numLines - 1 do
@@ -673,14 +674,16 @@ begin
if(numNotes=0) then
begin
Log.LogError('Sentence ' + IntToStr(line+1) + ' in song ' + AktSong.Path + AktSong.Filename + ' has no notes?');
- Exit;
+ if (Ini.LoadFaultySongs=0) then
+ Exit;
end;
if(bt>Czesci[p].Czesc[line].Start) then
begin
Log.LogError('Beat error in sentence ' + IntToStr(line+1) + ', on beat ' + IntToStr(Czesci[p].Czesc[line].Start) +
' in song ' + AktSong.Path + AktSong.Filename);
- Exit;
+ if (Ini.LoadFaultySongs=0) then
+ Exit;
end;
bt := Czesci[p].Czesc[line].Start;
@@ -690,7 +693,8 @@ begin
begin
Log.LogError('Beat error in sentence ' + IntToStr(line+1) + ', on beat ' + IntToStr(Czesci[p].Czesc[line].Nuta[note].Start) +
' in song ' + AktSong.Path + AktSong.Filename);
- Exit;
+ if (Ini.LoadFaultySongs=0) then
+ Exit;
end;
bt := Czesci[p].Czesc[line].Nuta[note].Start;
@@ -705,7 +709,7 @@ begin
begin
Log.LogError('Note length error in sentence ' + IntToStr(line+1) + ', on beat ' + IntToStr(Czesci[p].Czesc[line].Nuta[note].Start) +
' in song ' + AktSong.Path + AktSong.Filename);
- Exit;
+ //Exit;
end;
if(medley) then
@@ -722,11 +726,13 @@ begin
if(medley and not foundMedleyStart) then
begin
Log.LogError('Error MedleyStartBeat: no corresponding note start (beat) in song ' + AktSong.Path + AktSong.Filename);
- Exit;
+ if (Ini.LoadFaultySongs=0) then
+ Exit;
end else if(medley and not foundMedleyEnd) then
begin
Log.LogError('Error MedleyEndBeat: no corresponding note start+length in song ' + AktSong.Path + AktSong.Filename);
- Exit;
+ if (Ini.LoadFaultySongs=0) then
+ Exit;
end;
Result := true;
end;
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas
index 9007744c..02b9c5ef 100644
--- a/Game/Code/Classes/UIni.pas
+++ b/Game/Code/Classes/UIni.pas
@@ -22,6 +22,7 @@ type
Tabs_at_startup:integer; //Tabs at Startup fix
Sorting: integer;
Debug: integer;
+ LoadFaultySongs:integer;
// Graphics
Screens: integer;
@@ -118,6 +119,7 @@ const
sArtist2 = 7;
IDebug: array[0..1] of string = ('Off', 'On');
+ ILoadFaultySongs: array[0..1] of string = ('Off', 'On');
IScreens: array[0..1] of string = ('1', '2');
IFullScreen: array[0..1] of string = ('Off', 'On');
@@ -246,6 +248,11 @@ begin
for Pet := 0 to High(IDebug) do
if Tekst = IDebug[Pet] then Ini.Debug := Pet;
+ // Load faulty songs
+ Tekst := IniFile.ReadString('Game', 'LoadFaultySongs', ILoadFaultySongs[0]);
+ for Pet := 0 to High(IDebug) do
+ if Tekst = IDebug[Pet] then Ini.LoadFaultySongs := Pet;
+
//if Ini.Debug = 1 then SongPath := 'E:\UltraStar 03\Songs\';
// Screens
@@ -621,6 +628,10 @@ begin
Tekst := IDebug[Ini.Debug];
IniFile.WriteString('Game', 'Debug', Tekst);
+ // Load faulty songs
+ Tekst := IDebug[Ini.Debug];
+ IniFile.WriteString('Game', 'LoadFaultySongs', Tekst);
+
// Screens
Tekst := IScreens[Ini.Screens];
IniFile.WriteString('Graphics', 'Screens', Tekst);
diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr
index 437578d8..8a0c2a8e 100644
--- a/Game/Code/UltraStar.dpr
+++ b/Game/Code/UltraStar.dpr
@@ -124,7 +124,7 @@ uses
acinerella in 'lib\acinerella\acinerella.pas';
const
- Version = 'UltraStar Deluxe v1.0.1a Challenge-MOD r7 beta 1 2010-02-28';
+ Version = 'UltraStar Deluxe v1.0.1a Challenge-MOD r7 beta 2 2010-02-28';
var
WndTitle: string;