From 075cb824a31c5e6e1cc6ee6f0087ac5598ba003a Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Mon, 28 Jun 2010 15:42:13 +0000 Subject: - new option "PossibleScore": show max possible score in singscreen (toggle on/off with "S") - fade the "ball" also - fixed screensong preview volume - update of acinerella git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2565 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UDraw.pas | 96 +++++++++++++++++++----------- Game/Code/Classes/UFiles.pas | 10 +++- Game/Code/Classes/UIni.pas | 13 +++- Game/Code/Classes/ULyrics.pas | 8 ++- Game/Code/Classes/UMain.pas | 75 ++++++++++++++++++++++- Game/Code/Menu/UDrawTexture.pas | 18 ++++-- Game/Code/Screens/UScreenOptionsSound.pas | 2 + Game/Code/Screens/UScreenSing.pas | 13 +++- Game/Code/Screens/UScreenSong.pas | 6 +- Game/Code/UltraStar.bdsproj | 3 - Game/Code/UltraStar.dpr | 5 +- Game/Code/lib/acinerella/acinerella.c | 55 +++++------------ Game/Code/lib/acinerella/acinerella.h | 3 - Game/Code/lib/acinerella/acinerella.pas | 27 --------- Game/Output/Languages/German.ini | 1 + Game/Output/acinerella.dll | Bin 6211603 -> 6093312 bytes 16 files changed, 207 insertions(+), 128 deletions(-) diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index 0d0a710b..8fe6a85e 100644 --- a/Game/Code/Classes/UDraw.pas +++ b/Game/Code/Classes/UDraw.pas @@ -41,7 +41,7 @@ procedure SingDrawStar(X, Y, A: real); procedure SingGoldenStar(X, Y, A: real); } // The Singbar -procedure SingDrawSingbar(X, Y, W, H: real; Percent: integer); +procedure SingDrawSingbar(X, Y, W, H: real; Percent: integer; ScoreMax: integer); //Phrasen Bonus - Line Bonus procedure SingDrawLineBonus( const X, Y: Single; Color: TRGB; Alpha: Single; Text: string; Age: Integer); @@ -773,23 +773,23 @@ begin if PlayersPlay = 1 then begin //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1SingBar.x, Theme.Sing.StaticP1SingBar.y, Theme.Sing.StaticP1SingBar.w, Theme.Sing.StaticP1SingBar.h , Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1SingBar.x, Theme.Sing.StaticP1SingBar.y, Theme.Sing.StaticP1SingBar.w, Theme.Sing.StaticP1SingBar.h , Player[0].ScorePercent, Player[0].ScoreMax); end; if PlayersPlay = 2 then begin //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax); end; if PlayersPlay = 3 then begin //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent, Player[2].ScoreMax); end; if PlayersPlay = 4 then begin @@ -797,15 +797,15 @@ begin begin //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax); end; if ScreenAct = 2 then begin //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[2].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[3].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[2].ScorePercent, Player[2].ScoreMax); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[3].ScorePercent, Player[3].ScoreMax); end; end; if PlayersPlay = 6 then @@ -815,18 +815,18 @@ begin //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent, Player[2].ScoreMax); end; if ScreenAct = 2 then begin //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[4].ScorePercent); //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[5].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[3].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[4].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[5].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[3].ScorePercent, Player[3].ScoreMax); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[4].ScorePercent, Player[4].ScoreMax); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[5].ScorePercent, Player[5].ScoreMax); end; end; end; @@ -1312,67 +1312,67 @@ begin if PlayersPlay = 1 then begin if PlayerInfo.Playerinfo[0].Enabled then //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1SingBar.x, Theme.Sing.StaticP1SingBar.y, Theme.Sing.StaticP1SingBar.w, Theme.Sing.StaticP1SingBar.h , Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1SingBar.x, Theme.Sing.StaticP1SingBar.y, Theme.Sing.StaticP1SingBar.w, Theme.Sing.StaticP1SingBar.h , Player[0].ScorePercent, Player[0].ScoreMax); end; if PlayersPlay = 2 then begin if PlayerInfo.Playerinfo[0].Enabled then //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax); if PlayerInfo.Playerinfo[1].Enabled then //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax); end; if PlayersPlay = 3 then begin if PlayerInfo.Playerinfo[0].Enabled then //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax); if PlayerInfo.Playerinfo[1].Enabled then //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax); if PlayerInfo.Playerinfo[2].Enabled then //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent, Player[2].ScoreMax); end; if PlayersPlay = 4 then begin if ScreenAct = 1 then begin if PlayerInfo.Playerinfo[0].Enabled then //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax); if PlayerInfo.Playerinfo[1].Enabled then //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax); end; if ScreenAct = 2 then begin if PlayerInfo.Playerinfo[2].Enabled then //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1TwoPSingBar.x, Theme.Sing.StaticP1TwoPSingBar.y, Theme.Sing.StaticP1TwoPSingBar.w, Theme.Sing.StaticP1TwoPSingBar.h , Player[2].ScorePercent, Player[2].ScoreMax); if PlayerInfo.Playerinfo[3].Enabled then //SingDrawSingbar(620 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[3].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2RSingBar.x, Theme.Sing.StaticP2RSingBar.y, Theme.Sing.StaticP2RSingBar.w, Theme.Sing.StaticP2RSingBar.h , Player[3].ScorePercent, Player[3].ScoreMax); end; end; if PlayersPlay = 6 then begin if ScreenAct = 1 then begin if PlayerInfo.Playerinfo[0].Enabled then //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[0].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[0].ScorePercent, Player[0].ScoreMax); if PlayerInfo.Playerinfo[1].Enabled then //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[1].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[1].ScorePercent, Player[1].ScoreMax); if PlayerInfo.Playerinfo[2].Enabled then //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[2].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[2].ScorePercent, Player[2].ScoreMax); end; if ScreenAct = 2 then begin if PlayerInfo.Playerinfo[3].Enabled then //SingDrawSingbar( 75 + 10*ScreenX, 95, 100, 8, Player[3].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[3].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP1ThreePSingBar.x, Theme.Sing.StaticP1ThreePSingBar.y, Theme.Sing.StaticP1ThreePSingBar.w, Theme.Sing.StaticP1ThreePSingBar.h , Player[3].ScorePercent, Player[3].ScoreMax); if PlayerInfo.Playerinfo[4].Enabled then //SingDrawSingbar(370 + 10*ScreenX, 95, 100, 8, Player[4].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[4].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP2MSingBar.x, Theme.Sing.StaticP2MSingBar.y, Theme.Sing.StaticP2MSingBar.w, Theme.Sing.StaticP2MSingBar.h , Player[4].ScorePercent, Player[4].ScoreMax); if PlayerInfo.Playerinfo[5].Enabled then //SingDrawSingbar(670 + 10*ScreenX, 95, 100, 8, Player[5].ScorePercent); - SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[5].ScorePercent); + SingDrawSingbar(Theme.Sing.StaticP3SingBar.x, Theme.Sing.StaticP3SingBar.y, Theme.Sing.StaticP3SingBar.w, Theme.Sing.StaticP3SingBar.h , Player[5].ScorePercent, Player[5].ScoreMax); end; end; end; @@ -1596,12 +1596,13 @@ end; //SingBar Mod -procedure SingDrawSingbar(X, Y, W, H: real; Percent: integer); +procedure SingDrawSingbar(X, Y, W, H: real; Percent: integer; ScoreMax: integer); var R: Real; G: Real; B: Real; - + str: string; + wd: real; begin; //SingBar Background @@ -1674,6 +1675,31 @@ begin; glTexCoord2f(1, 1); glVertex2f(X+W, Y+H); glTexCoord2f(1, 0); glVertex2f(X+W, Y); glEnd; + + if (Ini.PossibleScore=0) then + Exit; + + //possible score Front + glColor4f(1, 1, 1, 0.8); + glEnable(GL_TEXTURE_2D); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBindTexture(GL_TEXTURE_2D, Tex_SingBar_Back.TexNum); + glBegin(GL_QUADS); + glTexCoord2f(0, 0); glVertex2f(X, Y+H); + glTexCoord2f(0, 1); glVertex2f(X, Y+H*3); + glTexCoord2f(1, 1); glVertex2f(X+W, Y+H*3); + glTexCoord2f(1, 0); glVertex2f(X+W, Y+H); + glEnd; + + glColor4f(0, 0, 0, 1); + SetFontStyle(1); + SetFontItalic(false); + SetFontSize(H*0.7); + str := 'max: ' + IntToStr(ScoreMax); + wd := glTextWidth(PChar(str)); + SetFontPos (X+W/2-wd/2, Y+H); + glPrint(PChar(str)); end; //end Singbar Mod diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index ecf2cbc8..242fe092 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -1368,10 +1368,13 @@ begin for note := 0 to Length(Czesci[pl].Czesc[line].Nuta) - 1 do begin if Czesci[pl].Czesc[line].Nuta[note].Start < start then //check start - Czesci[pl].Czesc[line].Nuta[note].FreeStyle := true - else if Czesci[pl].Czesc[line].Nuta[note].Start>= end_ then //check end begin Czesci[pl].Czesc[line].Nuta[note].FreeStyle := true; + Czesci[pl].Czesc[line].Nuta[note].Wartosc := 0; + end else if Czesci[pl].Czesc[line].Nuta[note].Start>= end_ then //check end + begin + Czesci[pl].Czesc[line].Nuta[note].FreeStyle := true; + Czesci[pl].Czesc[line].Nuta[note].Wartosc := 0; if not foundcut[pl] then begin if (note=0) then @@ -1396,7 +1399,8 @@ begin if (foundcut[pl]) and (Length(Czesci[pl].Czesc)>cut_line[pl]) then begin SetLength(Czesci[pl].Czesc, cut_line[pl]); - Czesci[pl].high := cut_line[pl]-1; + Czesci[pl].High := cut_line[pl]-1; + Czesci[pl].Ilosc := Czesci[pl].High+1; end; end; end; diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas index cc24e3a8..6e2f1b16 100644 --- a/Game/Code/Classes/UIni.pas +++ b/Game/Code/Classes/UIni.pas @@ -82,6 +82,7 @@ type PartyPopup: integer; SumPlayers: integer; DuelRatio: integer; + PossibleScore: integer; // Soundcards SoundCard: array[0..7, 1..2] of integer; @@ -169,13 +170,14 @@ const // Advanced ILoadAnimation: array[0..1] of string = ('Off', 'On'); IEffectSing: array[0..1] of string = ('Off', 'On'); - IScreenFade: array [0..1] of String =('Off', 'On'); + IScreenFade: array[0..1] of String =('Off', 'On'); IAskbeforeDel: array[0..1] of string = ('Off', 'On'); IOnSongClick: array[0..2] of string = ('Sing', 'Select Players', 'Open Menu'); ILineBonus: array[0..2] of string = ('Off', 'At Score', 'At Notes'); IPartyPopup: array[0..1] of string = ('Off', 'On'); ISumPlayers: array[0..2] of string = ('Never', 'Dynamic', 'Always'); IDuelRatio: array[0..9] of string = ('normal', '10%', '20%', '30%', '40%', '50%', '60%', '70%', '80%', '90%'); + IPossibleScore: array[0..1] of string = ('Off', 'On'); IChannel: array[0..6] of string = ('Off', '1', '2', '3', '4', '5', '6'); @@ -604,6 +606,11 @@ begin for Pet := 0 to High(IDuelRatio) do if Tekst = IDuelRatio[Pet] then Ini.DuelRatio := Pet; + // PossibleScore + Tekst := IniFile.ReadString('Advanced', 'PossibleScore', IPossibleScore[0]); + for Pet := 0 to High(IPossibleScore) do + if Tekst = IPossibleScore[Pet] then Ini.PossibleScore := Pet; + // SongPath if (Params.SongPath <> '') then SongPath := IncludeTrailingPathDelimiter(Params.SongPath) @@ -831,6 +838,10 @@ begin Tekst := IDuelRatio[Ini.DuelRatio]; IniFile.WriteString('Advanced', 'DuelRatio', Tekst); + //PossibleScore + Tekst := IPossibleScore[Ini.PossibleScore]; + IniFile.WriteString('Advanced', 'PossibleScore', Tekst); + IniFile.Free; end; end; diff --git a/Game/Code/Classes/ULyrics.pas b/Game/Code/Classes/ULyrics.pas index c6a5e635..0b301260 100644 --- a/Game/Code/Classes/ULyrics.pas +++ b/Game/Code/Classes/ULyrics.pas @@ -316,7 +316,8 @@ begin end; 3: // slide begin - for W := 0 to High(Word) do begin + for W := 0 to High(Word) do + begin if not Word[W].Selected then DrawNormal(W) else @@ -329,12 +330,13 @@ begin DrawNormal(W); for W := 0 to High(Word) do - if Word[W].Selected then begin + if Word[W].Selected then + begin Tex_Ball.X := (Word[W].X - 10) + Word[W].Done * Word[W].Width; Tex_Ball.Y := YR -12 - 10*sin(Word[W].Done * pi); Tex_Ball.W := 20; Tex_Ball.H := 20; - DrawTexture(Tex_Ball); + DrawTexture(Tex_Ball, Alpha); end; end; end; // case diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas index c2497f32..a1df643e 100644 --- a/Game/Code/Classes/UMain.pas +++ b/Game/Code/Classes/UMain.pas @@ -26,6 +26,8 @@ type ScorePercentTarget: integer;//Target Fillstate of the SingBar //end Singbar Mod + ScoreMax: integer; //max possible score (actual) + //PhrasenBonus - Line Bonus Mod LineBonus_PosX: Single; LineBonus_PosY: Single; @@ -112,7 +114,7 @@ function GetTimeFromBeat(Beat: integer): real; procedure ClearScores(PlayerNum: integer); implementation -uses USongs, math, UCommandLine, UVideo; +uses USongs, Math, UCommandLine, UVideo; procedure MainLoop; var @@ -548,6 +550,9 @@ procedure NewNote(P: integer; Sender: TScreenSing); var CP: integer; // current player S: integer; // sentence + N: integer; + SumN: real; + NumS: integer; SMin: integer; SMax: integer; SDet: integer; // temporary: sentence of detected note @@ -698,6 +703,39 @@ begin end;// else beep; // if S = SMax end; //for end; // if moze + + //calc score last + SumN := 0; + NumS := 0; + for S := Czesci[P].Akt to Czesci[P].High do + begin + for N := 0 to Czesci[P].Czesc[S].HighNut do + begin + if (Czesci[P].Czesc[S].Nuta[N].Start+Czesci[P].Czesc[S].Nuta[N].Dlugosc + >= Czas.AktBeatD) then + begin + if (Ini.LineBonus = 0) then + // add points without LineBonus + SumN := SumN + 10000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * + Czesci[P].Czesc[S].Nuta[N].Dlugosc + else + // add points with Line Bonus + SumN := SumN + 9000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * + Czesci[P].Czesc[S].Nuta[N].Dlugosc; + end; + end; + + if (Czesci[P].Czesc[S].TotalNotes>0) and + (Czesci[P].Czesc[S].Koniec > Czas.AktBeatD) then + Inc(NumS); + end; + + N := (Czesci[P].Ilosc - ScreenSing.NumEmptySentences[P]); + if (N>0) and (Ini.LineBonus > 0) then + Player[CP].ScoreMax := Floor((SumN + NumS*1000 / N)/10)*10; + + Player[CP].ScoreMax := Player[CP].ScoreTotalI + Player[CP].ScoreMax; + end else begin //############################ DUET ##################### if (CP mod 2 = P) then @@ -838,8 +876,41 @@ begin end;// else beep; // if S = SMax end; //for end; // if moze + + //calc score last + SumN := 0; + NumS := 0; + for S := Czesci[P].Akt to Czesci[P].High do + begin + for N := 0 to Czesci[P].Czesc[S].HighNut do + begin + if (Czesci[P].Czesc[S].Nuta[N].Start+Czesci[P].Czesc[S].Nuta[N].Dlugosc + >=Czas.AktBeat) then + begin + if (Ini.LineBonus = 0) then + // add points without LineBonus + SumN := SumN + 10000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * + Czesci[P].Czesc[S].Nuta[N].Dlugosc + else + // add points with Line Bonus + SumN := SumN + 9000 / Czesci[P].Wartosc * Czesci[P].Czesc[S].Nuta[N].Wartosc * + Czesci[P].Czesc[S].Nuta[N].Dlugosc; + end; + end; + + if (Czesci[P].Czesc[S].TotalNotes>0) and + (Czesci[P].Czesc[S].Koniec > Czas.AktBeatD) then + Inc(NumS); + end; + + N := (Czesci[P].Ilosc - ScreenSing.NumEmptySentences[P]); + if (N>0) and (Ini.LineBonus > 0) then + Player[CP].ScoreMax := Floor((SumN + NumS*1000 / N)/10)*10; + + Player[CP].ScoreMax := Player[CP].ScoreTotalI + Player[CP].ScoreMax; end; //if mod 2 end; + end; // for CP //On Sentence End -> For LineBonus + SingBar @@ -871,6 +942,8 @@ begin Player[PlayerNum].ScorePercentTarget := 50;// Sets to 50% when song starts //end SingBar Mod + Player[PlayerNum].ScoreMax := 9990; + //PhrasenBonus - Line Bonus Mod Player[PlayerNum].LineBonus_Visible := False; //Hide Line Bonus Player[PlayerNum].LineBonus_Alpha := 0; diff --git a/Game/Code/Menu/UDrawTexture.pas b/Game/Code/Menu/UDrawTexture.pas index 5509b29c..128375d9 100644 --- a/Game/Code/Menu/UDrawTexture.pas +++ b/Game/Code/Menu/UDrawTexture.pas @@ -5,7 +5,9 @@ uses UTexture; procedure DrawLine(X1, Y1, X2, Y2, ColR, ColG, ColB: real); procedure DrawQuad(X, Y, W, H, ColR, ColG, ColB: real); -procedure DrawTexture(Texture: TTexture); +procedure DrawTexture(Texture: TTexture; Alph: real) overload; +procedure DrawTexture(Texture: TTexture) overload; + implementation uses gl; @@ -30,16 +32,17 @@ begin glEnd; end; -procedure DrawTexture(Texture: TTexture); +procedure DrawTexture(Texture: TTexture; Alph: real); var x1, x2, x3, x4: real; y1, y2, y3, y4: real; xt1, xt2, xt3, xt4: real; yt1, yt2, yt3, yt4: real; begin - with Texture do begin + with Texture do + begin // rysuje paski gracza - glColor4f(ColR * Int, ColG * Int, ColB * Int, Alpha); + glColor4f(ColR * Int, ColG * Int, ColB * Int, Alpha*Alph); glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glDepthRange(0, 10); @@ -94,8 +97,13 @@ begin glTexCoord2f(TexX2*TexW, TexY1*TexH); glVertex3f(x4, y4, z); glEnd; end; - glDisable(GL_DEPTH_TEST); + glDisable(GL_DEPTH_TEST); glDisable(GL_TEXTURE_2D); end; +procedure DrawTexture(Texture: TTexture); +begin + DrawTexture(Texture, 1); +end; + end. diff --git a/Game/Code/Screens/UScreenOptionsSound.pas b/Game/Code/Screens/UScreenOptionsSound.pas index 6735abea..b9969aa5 100644 --- a/Game/Code/Screens/UScreenOptionsSound.pas +++ b/Game/Code/Screens/UScreenOptionsSound.pas @@ -40,6 +40,7 @@ begin begin Ini.Save; Music.PlayBack; + ScreenSong.MP3Volume := Ini.PreviewVolume * 10; FadeTo(@ScreenOptions); end; SDLK_RETURN: @@ -47,6 +48,7 @@ begin if SelInteraction = 6 then begin Ini.Save; Music.PlayBack; + ScreenSong.MP3Volume := Ini.PreviewVolume * 10; FadeTo(@ScreenOptions); end; end; diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index e07d5023..fbf128b0 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -15,8 +15,8 @@ type protected paused: boolean; //Pause Mod PauseTime: Real; - NumEmptySentences: array [0..1] of integer; public + NumEmptySentences: array [0..1] of integer; //TextTime: integer; MP3Volume: integer; MP3VolumeHandler: THandler; @@ -213,6 +213,12 @@ begin begin Pause; end; + + SDLK_S: + begin + Ini.PossibleScore := (Ini.PossibleScore+1) mod 2; + Ini.Save; + end; SDLK_RETURN: begin @@ -1766,8 +1772,9 @@ begin Player[I].LineBonus_Text := Theme.Sing.LineBonusText[Floor(A)]; //PhrasenBonus give Points - Player[I].ScoreLine := Player[I].ScoreLine + - (1000 / (Length(Czesci[CP].Czesc) - NumEmptySentences[CP]) * A / 8); + if (Length(Czesci[CP].Czesc) - NumEmptySentences[CP])>0 then + Player[I].ScoreLine := Player[I].ScoreLine + + (1000 / (Length(Czesci[CP].Czesc) - NumEmptySentences[CP]) * A / 8); Player[I].ScoreLineI := Round(Player[I].ScoreLine / 10) * 10; //Update Total Score diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index 596eec57..56590166 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -2452,7 +2452,7 @@ begin try acGetFrame(Czas.Teraz); - Blend := (CoverTime-1.75)/Ini.PreviewFading; + Blend := (CoverTime-1.75)/2; if Blend<0 then Blend := 0 else if Blend>1 then @@ -2855,7 +2855,7 @@ end; procedure TScreenSong.ChangeMusic; begin //When Music Preview is avtivated -> then Change Music - if (Ini.PreviewVolume <> 0) then + if (Ini.PreviewVolume >= 0) then begin if (NOT CatSongs.Song[Interaction].Main) AND(CatSongs.VisibleSongs > 0) then begin @@ -2929,7 +2929,7 @@ end; procedure TScreenSong.StartVideoPreview; begin - if (Ini.PreviewVolume <> 0) and (Ini.MovieSize < 3) then + if (Ini.PreviewVolume >= 0) and (Ini.MovieSize < 3) then begin if (NOT CatSongs.Song[Interaction].Main) AND (CatSongs.VisibleSongs > 0) then begin diff --git a/Game/Code/UltraStar.bdsproj b/Game/Code/UltraStar.bdsproj index 8cf38637..acdabdad 100644 --- a/Game/Code/UltraStar.bdsproj +++ b/Game/Code/UltraStar.bdsproj @@ -171,9 +171,6 @@ 1.0.0.0 - - - Borland InterBase Express Components Intraweb 8.0 Design Package for Borland Development Studio 2006 diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr index 92ddbaa5..954b0387 100644 --- a/Game/Code/UltraStar.dpr +++ b/Game/Code/UltraStar.dpr @@ -119,7 +119,7 @@ uses UVideo in 'Classes\UVideo.pas'; const - Version = 'UltraStar Deluxe Challenge, Medley & Duet Edition r9 beta 2'; + Version = 'UltraStar Deluxe Challenge, Medley & Duet Edition r9 beta 4'; var WndTitle: string; @@ -312,6 +312,9 @@ begin Log.BenchmarkEnd(0); Log.LogBenchmark('Loading Time', 0); + //Create/Save Ini + Ini.Save; + //------------------------------ //Start- Mainloop //------------------------------ diff --git a/Game/Code/lib/acinerella/acinerella.c b/Game/Code/lib/acinerella/acinerella.c index bae6b0e8..5e7c4df2 100644 --- a/Game/Code/lib/acinerella/acinerella.c +++ b/Game/Code/lib/acinerella/acinerella.c @@ -95,22 +95,6 @@ struct _ac_package_data { typedef struct _ac_package_data ac_package_data; typedef ac_package_data* lp_ac_package_data; -// -//--- Memory manager --- -// - -ac_malloc_callback mgr_malloc = &malloc; -ac_realloc_callback mgr_realloc = &realloc; -ac_free_callback mgr_free = &free; - -void CALL_CONVT ac_mem_mgr(ac_malloc_callback mc, ac_realloc_callback rc, - ac_free_callback fc) -{ - mgr_malloc = mc; - mgr_realloc = rc; - mgr_free = fc; -} - // //--- Initialization and Stream opening--- // @@ -132,7 +116,7 @@ void init_info(lp_ac_file_info info) lp_ac_instance CALL_CONVT ac_init(void) { //Allocate a new instance of the videoplayer data and return it lp_ac_data ptmp; - ptmp = (lp_ac_data)mgr_malloc(sizeof(ac_data)); + ptmp = (lp_ac_data)av_malloc(sizeof(ac_data)); //Initialize the created structure memset(ptmp, 0, sizeof(ac_data)); @@ -149,7 +133,7 @@ void CALL_CONVT ac_free(lp_ac_instance pacInstance) { ac_close(pacInstance); if (pacInstance != NULL) { - mgr_free((lp_ac_data)pacInstance); + av_free((lp_ac_data)pacInstance); } } @@ -508,7 +492,7 @@ lp_ac_package CALL_CONVT ac_read_package(lp_ac_instance pacInstance) { AVPacket Package; if (av_read_frame(((lp_ac_data)(pacInstance))->pFormatCtx, &Package) >= 0) { //Reserve memory - lp_ac_package_data pTmp = (lp_ac_package_data)(mgr_malloc(sizeof(ac_package_data))); + lp_ac_package_data pTmp = (lp_ac_package_data)(av_malloc(sizeof(ac_package_data))); //Set package data pTmp->package.stream_index = Package.stream_index; @@ -532,7 +516,7 @@ void CALL_CONVT ac_free_package(lp_ac_package pPackage) { if (pkt->destruct) pkt->destruct(pkt); pkt->data = NULL; pkt->size = 0; } - mgr_free((lp_ac_package_data)pPackage); + av_free((lp_ac_package_data)pPackage); } } @@ -554,7 +538,7 @@ enum PixelFormat convert_pix_format(ac_output_format fmt) { void* ac_create_video_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info, int nb) { //Allocate memory for a new decoder instance lp_ac_video_decoder pDecoder; - pDecoder = (lp_ac_video_decoder)(mgr_malloc(sizeof(ac_video_decoder))); + pDecoder = (lp_ac_video_decoder)(av_malloc(sizeof(ac_video_decoder))); //Set a few properties pDecoder->decoder.pacInstance = pacInstance; @@ -582,7 +566,7 @@ void* ac_create_video_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info //Reserve buffer memory pDecoder->decoder.buffer_size = avpicture_get_size(convert_pix_format(pacInstance->output_format), pDecoder->pCodecCtx->width, pDecoder->pCodecCtx->height); - pDecoder->decoder.pBuffer = (uint8_t*)mgr_malloc(pDecoder->decoder.buffer_size); + pDecoder->decoder.pBuffer = (uint8_t*)av_malloc(pDecoder->decoder.buffer_size); //Link decoder to buffer avpicture_fill( @@ -597,7 +581,7 @@ void* ac_create_video_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info void* ac_create_audio_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info, int nb) { //Allocate memory for a new decoder instance lp_ac_audio_decoder pDecoder; - pDecoder = (lp_ac_audio_decoder)(mgr_malloc(sizeof(ac_audio_decoder))); + pDecoder = (lp_ac_audio_decoder)(av_malloc(sizeof(ac_audio_decoder))); //Set a few properties pDecoder->decoder.pacInstance = pacInstance; @@ -621,7 +605,7 @@ void* ac_create_audio_decoder(lp_ac_instance pacInstance, lp_ac_stream_info info //Reserve a buffer pDecoder->max_buffer_size = AUDIO_BUFFER_BASE_SIZE; - pDecoder->decoder.pBuffer = (uint8_t*)(mgr_malloc(pDecoder->max_buffer_size)); + pDecoder->decoder.pBuffer = av_malloc(AUDIO_BUFFER_BASE_SIZE); pDecoder->decoder.buffer_size = 0; return (void*)pDecoder; @@ -717,22 +701,13 @@ int ac_decode_audio_package(lp_ac_package pPackage, lp_ac_audio_decoder pDecoder int dest_buffer_size = pDecoder->max_buffer_size; int dest_buffer_pos = 0; - //An dummy package representing the source buffer - AVPacket pkt_tmp; - pkt_tmp.data = ((lp_ac_package_data)pPackage)->ffpackage.data; - pkt_tmp.size = ((lp_ac_package_data)pPackage)->ffpackage.size; - + //Make a copy of the package read by avformat, so that we can move the data pointers around + AVPacket pkt_tmp = ((lp_ac_package_data)pPackage)->ffpackage; + //Initialize the buffer size pDecoder->decoder.buffer_size = 0; while (pkt_tmp.size > 0) { - - if (dest_buffer_size <= AUDIO_BUFFER_BASE_SIZE) { - pDecoder->decoder.pBuffer = mgr_realloc(pDecoder->decoder.pBuffer, pDecoder->max_buffer_size * 2); - dest_buffer_size += pDecoder->max_buffer_size; - pDecoder->max_buffer_size *= 2; - } - //Set the size of bytes that can be written to the current size of the destination buffer int size = dest_buffer_size; @@ -836,10 +811,10 @@ void ac_free_video_decoder(lp_ac_video_decoder pDecoder) { //Free reserved memory for the buffer - mgr_free(pDecoder->decoder.pBuffer); + av_free(pDecoder->decoder.pBuffer); //Free reserved memory for decoder record - mgr_free(pDecoder); + av_free(pDecoder); } //Free video decoder @@ -848,10 +823,10 @@ void ac_free_audio_decoder(lp_ac_audio_decoder pDecoder) { avcodec_close(pDecoder->pCodecCtx); //Free reserved memory for the buffer - mgr_free(pDecoder->decoder.pBuffer); + av_free(pDecoder->decoder.pBuffer); //Free reserved memory for decoder record - mgr_free(pDecoder); + av_free(pDecoder); } void CALL_CONVT ac_free_decoder(lp_ac_decoder pDecoder) { diff --git a/Game/Code/lib/acinerella/acinerella.h b/Game/Code/lib/acinerella/acinerella.h index a758164d..9eded573 100644 --- a/Game/Code/lib/acinerella/acinerella.h +++ b/Game/Code/lib/acinerella/acinerella.h @@ -200,9 +200,6 @@ typedef void* CALL_CONVT (*ac_malloc_callback)(size_t size); typedef void* CALL_CONVT (*ac_realloc_callback)(void *ptr, size_t size); typedef void CALL_CONVT (*ac_free_callback)(void *ptr); -//Memory manager function. This allows you to bind the library to your applications memory interface. -extern void CALL_CONVT ac_mem_mgr(ac_malloc_callback, ac_realloc_callback, ac_free_callback); - /*Initializes an Acinerella instance.*/ extern lp_ac_instance CALL_CONVT ac_init(void); extern void CALL_CONVT ac_free(lp_ac_instance pacInstance); diff --git a/Game/Code/lib/acinerella/acinerella.pas b/Game/Code/lib/acinerella/acinerella.pas index c806cc8f..2d267027 100644 --- a/Game/Code/lib/acinerella/acinerella.pas +++ b/Game/Code/lib/acinerella/acinerella.pas @@ -249,33 +249,6 @@ function ac_probe_input_buffer(buf: PChar; bufsize: Integer; filename: PChar; implementation -{Connect the library memory management to the host application. This happens - automatically when the application gets initialized and nobody has to care - about it.} - -function ac_mem_mgr( - ptr_malloc: Pointer; - ptr_realloc: Pointer; - ptr_free: Pointer): PAc_instance; cdecl; external ac_dll; - -function malloc(size: integer): Pointer; cdecl; -begin - result := GetMemory(size); -end; - -function realloc(ptr: Pointer; size: integer): pointer; cdecl; -begin - result := ReallocMemory(ptr, size); -end; - -procedure free(ptr: Pointer); cdecl; -begin - FreeMemory(ptr); -end; - -initialization - ac_mem_mgr(@malloc, @realloc, @free); - end. diff --git a/Game/Output/Languages/German.ini b/Game/Output/Languages/German.ini index 6e0f1cda..fafb52c5 100644 --- a/Game/Output/Languages/German.ini +++ b/Game/Output/Languages/German.ini @@ -1126,6 +1126,7 @@ K = Experimentelle Karaoke-Funktion ein/ausschalten [ID_024] Title = Liedauswahl Description = Hier werden alle vorhandenen Lieder für das normale Singen angezeigt. Scrollt durch die Liste oder verwendet die Suche, um euren Lieblingssong zu finden. Duett-Lieder sind über die Suche filterbar. +Tipp: Man kann in jedem Bildschirm eine Hilfe mit der TAB-Taste aufrufen. #-------------------------------------------------------# SEC_001 = Allgemein ESC = zurück diff --git a/Game/Output/acinerella.dll b/Game/Output/acinerella.dll index 22c6949c..99908aa5 100644 Binary files a/Game/Output/acinerella.dll and b/Game/Output/acinerella.dll differ -- cgit v1.2.3