diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-10-28 20:16:05 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-10-28 20:16:05 +0000 |
commit | 6585afce2ccd8e7c5ccb3bb3599d4723b00a0433 (patch) | |
tree | 463f04cca3f1a041569286559b2987698a457a54 | |
parent | 4025ea3e81b0d2ec4492f3a0b3e374ce1568bdf5 (diff) | |
download | usdx-6585afce2ccd8e7c5ccb3bb3599d4723b00a0433.tar.gz usdx-6585afce2ccd8e7c5ccb3bb3599d4723b00a0433.tar.xz usdx-6585afce2ccd8e7c5ccb3bb3599d4723b00a0433.zip |
some compiler warnings/hints removed
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1485 b956fd51-792f-4845-bead-9b4dfca2ff2c
26 files changed, 28 insertions, 106 deletions
diff --git a/src/base/TextGLFreetype.pas b/src/base/TextGLFreetype.pas index 6a41b5de..4f8a5068 100644 --- a/src/base/TextGLFreetype.pas +++ b/src/base/TextGLFreetype.pas @@ -90,7 +90,7 @@ end; procedure BuildFont;
var
FontIni: TMemIniFile;
- BitmapFont: TBitmapFont;
+ //BitmapFont: TBitmapFont;
FontFile: string;
begin
ActFont := 0;
diff --git a/src/base/UCommandLine.pas b/src/base/UCommandLine.pas index 17ea1a19..281a480d 100644 --- a/src/base/UCommandLine.pas +++ b/src/base/UCommandLine.pas @@ -301,8 +301,9 @@ end; // GetLanguage - Get Language ID from saved String Information //------------- function TCMDParams.GetLanguage: integer; -var +{var I: integer; +} begin Result := -1; {* JB - 12sep07 to remove uINI dependency @@ -321,8 +322,9 @@ end; // GetResolution - Get Resolution ID from saved String Information //------------- function TCMDParams.GetResolution: integer; -var +{var I: integer; +} begin Result := -1; {* JB - 12sep07 to remove uINI dependency diff --git a/src/base/UCovers.pas b/src/base/UCovers.pas index d4b4e471..a1705674 100644 --- a/src/base/UCovers.pas +++ b/src/base/UCovers.pas @@ -405,7 +405,7 @@ end; *) function TCoverDatabase.CreateThumbnail(const Filename: WideString; var Info: TThumbnailInfo): PSDL_Surface; var - TargetAspect, SourceAspect: double; + //TargetAspect, SourceAspect: double; //TargetWidth, TargetHeight: integer; Thumbnail: PSDL_Surface; MaxSize: integer; diff --git a/src/base/UDLLManager.pas b/src/base/UDLLManager.pas index 5e64f221..cd4b7991 100644 --- a/src/base/UDLLManager.pas +++ b/src/base/UDLLManager.pas @@ -162,7 +162,7 @@ function TDLLMan.LoadPluginInfo(Filename: String; No: Cardinal): boolean; var hLibg: THandle; Info: pModi_PluginInfo; - I: Integer; + //I: Integer; begin Result := False; //Clear Plugin Info diff --git a/src/base/UDataBase.pas b/src/base/UDataBase.pas index 1b9e432c..0f9d88a7 100644 --- a/src/base/UDataBase.pas +++ b/src/base/UDataBase.pas @@ -531,7 +531,6 @@ end; function TDataBaseSystem.GetStatReset: TDateTime; var Query: string; - ResetTime: int64; begin Result := 0; diff --git a/src/base/UDraw.pas b/src/base/UDraw.pas index a92d67d4..d3f19019 100644 --- a/src/base/UDraw.pas +++ b/src/base/UDraw.pas @@ -254,7 +254,6 @@ var Rec: TRecR; Count: integer; TempR: real; - R,G,B: real; PlayerNumber: Integer; @@ -374,7 +373,7 @@ var TempR: real; Rec: TRecR; N: integer; - R, G, B, A: real; + //R, G, B, A: real; NotesH2: real; begin //Log.LogStatus('Player notes', 'SingDraw'); @@ -463,7 +462,7 @@ begin // Perfect note is stored if Perfect and (Ini.EffectSing=1) then begin - A := 1 - 2*(LyricsState.GetCurrentTime() - GetTimeFromBeat(Start+Length)); + //A := 1 - 2*(LyricsState.GetCurrentTime() - GetTimeFromBeat(Start+Length)); if not (Start+Length-1 = LyricsState.CurrentBeatD) then begin //Star animation counter @@ -489,7 +488,6 @@ var Rec: TRecR; Count: integer; TempR: real; - R,G,B: real; X1, X2, X3, X4: real; W, H: real; @@ -894,19 +892,7 @@ end; // q'n'd for using the game mode dll's procedure SingModiDraw (PlayerInfo: TPlayerInfo); var - Count: integer; - Pet2: integer; - TempR: real; - Rec: TRecR; - TexRec: TRecR; NR: TRecR; - FS: real; - BarFrom: integer; - BarAlpha: real; - BarWspol: real; - TempCol: real; - Tekst: string; - PetCz: integer; begin // positions if Ini.SingWindow = 0 then begin diff --git a/src/base/UEditorLyrics.pas b/src/base/UEditorLyrics.pas index 3c4ddb24..d06fc891 100644 --- a/src/base/UEditorLyrics.pas +++ b/src/base/UEditorLyrics.pas @@ -147,8 +147,6 @@ begin end; procedure TEditorLyrics.SetSelected(Value: integer); -var - W: integer; begin if (SelectedI > -1) and (SelectedI <= High(Word)) then begin diff --git a/src/base/UGraphic.pas b/src/base/UGraphic.pas index 75c90134..b525c170 100644 --- a/src/base/UGraphic.pas +++ b/src/base/UGraphic.pas @@ -760,7 +760,6 @@ begin end; procedure UnLoadScreens; -var I: Integer; begin ScreenMain.Destroy; ScreenName.Destroy; diff --git a/src/base/UJoystick.pas b/src/base/UJoystick.pas index 25d1d663..30808812 100644 --- a/src/base/UJoystick.pas +++ b/src/base/UJoystick.pas @@ -75,7 +75,8 @@ uses SysUtils, constructor TJoy.Create; var - B, N: integer; + B: integer; + //N: integer; begin inherited; @@ -137,7 +138,7 @@ begin Log.LogError('Could not Init Joystick'); exit; end; - N := SDL_JoystickNumButtons(SDL_Joy); + //N := SDL_JoystickNumButtons(SDL_Joy); //if N < 6 then Log.LogStatus('Joystick button count < 6', 'TJoy.Create'); for B := 0 to 5 do begin diff --git a/src/base/UMain.pas b/src/base/UMain.pas index 6c77ebc0..6300f18b 100644 --- a/src/base/UMain.pas +++ b/src/base/UMain.pas @@ -432,7 +432,6 @@ var const MAX_FPS = 100; begin - Delay := 0; SDL_EnableKeyRepeat(125, 125); CountSkipTime(); // JB - for some reason this seems to be needed when we use the SDL Timer functions. @@ -732,10 +731,7 @@ var Count: integer; CountGr: integer; CP: integer; - Done: real; N: integer; - CurLine: PLine; - CurNote: PLineFragment; begin LyricsState.UpdateBeats(); @@ -767,20 +763,6 @@ begin // make some operations when detecting new voice pitch if (LyricsState.CurrentBeatD >= 0) and (LyricsState.OldBeatD <> LyricsState.CurrentBeatD) then NewBeatDetect(Screen); - - CurLine := @Lines[0].Line[Lines[0].Current]; - - // remove moving text - Done := 1; - for N := 0 to CurLine.HighNote do - begin - CurNote := @CurLine.Note[N]; - if (CurNote.Start <= LyricsState.MidBeat) and - (CurNote.Start + CurNote.Length >= LyricsState.MidBeat) then - begin - Done := (LyricsState.MidBeat - CurNote.Start) / CurNote.Length; - end; - end; end; procedure NewSentence(Screen: TScreenSing); diff --git a/src/base/USong.pas b/src/base/USong.pas index 4793b7e9..cff56c1d 100644 --- a/src/base/USong.pas +++ b/src/base/USong.pas @@ -583,8 +583,8 @@ end; function TSong.ReadXMLHeader(const aFileName : WideString): boolean; var - Line, Identifier, Value: string; - Temp : word; + //Line, Identifier, Value: string; + //Temp : word; Done : byte; Parser : TParser; diff --git a/src/base/USongs.pas b/src/base/USongs.pas index 6f1f7c51..6f66bf3f 100644 --- a/src/base/USongs.pas +++ b/src/base/USongs.pas @@ -687,7 +687,7 @@ end; procedure TCatSongs.ClickCategoryButton(Index: integer); var - Num, S: integer; + Num: integer; begin Num := CatSongs.Song[Index].OrderNum; if Num <> CatNumShow then @@ -703,7 +703,7 @@ end; //Hide Categorys when in Category Hack procedure TCatSongs.ShowCategoryList; var - Num, S: integer; + S: integer; begin // Hide All Songs Show All Cats for S := 0 to high(CatSongs.Song) do diff --git a/src/base/UTexture.pas b/src/base/UTexture.pas index 0f0117ff..4f33b78a 100644 --- a/src/base/UTexture.pas +++ b/src/base/UTexture.pas @@ -251,7 +251,6 @@ end; function TTextureUnit.LoadTexture(const Identifier: string; Typ: TTextureType; Col: LongWord): TTexture; var TexSurface: PSDL_Surface; - MipmapSurface: PSDL_Surface; newWidth, newHeight: Cardinal; oldWidth, oldHeight: Cardinal; ActTex: GLuint; @@ -299,7 +298,6 @@ begin FitImage(TexSurface, newWidth, newHeight); // at this point we have the image in memory... - // scaled to be at most 1024x1024 pixels large // scaled so that dimensions are powers of 2 // and converted to either RGB or RGBA @@ -375,7 +373,6 @@ end; function TTextureUnit.GetTexture(const Name: string; Typ: TTextureType; Col: LongWord; FromCache: boolean): TTexture; var TextureIndex: integer; - CoverIndex: integer; begin if (Name = '') then begin @@ -386,18 +383,6 @@ begin if (FromCache) then begin - (* - // use cache texture - CoverIndex := Covers.FindCover(Name); - - if TextureDatabase.Texture[TextureIndex].TextureCache.TexNum = 0 then - begin - // load texture - Covers.PrepareData(Name); - TextureDatabase.Texture[TextureIndex].TextureCache := CreateTexture(Covers.Data, Name, Covers.Cover[CoverIndex].Width, Covers.Cover[CoverIndex].Height, 24); - end; - *) - // use texture TextureIndex := TextureDatabase.FindTexture(Name, Typ, Col); if (TextureIndex > -1) then @@ -432,7 +417,7 @@ end; function TTextureUnit.CreateTexture(Data: PChar; const Name: string; Width, Height: word; BitsPerPixel: byte): TTexture; var - Error: integer; + //Error: integer; ActTex: GLuint; begin glGenTextures(1, @ActTex); // ActText = new texture number diff --git a/src/menu/UMenuBackground.pas b/src/menu/UMenuBackground.pas index 6a73b621..c85f0806 100644 --- a/src/menu/UMenuBackground.pas +++ b/src/menu/UMenuBackground.pas @@ -49,7 +49,7 @@ type procedure OnShow; virtual;
procedure Draw; virtual;
procedure OnFinish; virtual;
- destructor Destroy; virtual;
+ destructor Destroy; override;
end;
cMenuBackground = class of TMenuBackground;
diff --git a/src/menu/UMenuSelectSlide.pas b/src/menu/UMenuSelectSlide.pas index d04b20d0..1a0fa725 100644 --- a/src/menu/UMenuSelectSlide.pas +++ b/src/menu/UMenuSelectSlide.pas @@ -209,7 +209,6 @@ end; procedure TSelectSlide.SetSelectOpt(Value: integer); var SO: integer; - Sel: integer; HalfL: integer; HalfR: integer; @@ -252,7 +251,7 @@ begin end else if (Value >= high(TextOptT)) then begin //Last Option Selected - Value := high(TextOptT); + Value := high(TextOptT); for SO := high(TextOpt) downto low (TextOpt) do begin diff --git a/src/menu/UMenuText.pas b/src/menu/UMenuText.pas index 5c41eba5..3fc60384 100644 --- a/src/menu/UMenuText.pas +++ b/src/menu/UMenuText.pas @@ -111,7 +111,7 @@ var function GetNextPos: boolean; var - T1, T2, T3: Cardinal; + T1, {T2,} T3: Cardinal; begin LastPos := NextPos; diff --git a/src/screens/UScreenEditConvert.pas b/src/screens/UScreenEditConvert.pas index 8de2efe4..8cc6c59d 100644 --- a/src/screens/UScreenEditConvert.pas +++ b/src/screens/UScreenEditConvert.pas @@ -127,8 +127,6 @@ uses UGraphic, USkins; function TScreenEditConvert.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; -var - T: integer; begin Result := true; If (PressedDown) Then diff --git a/src/screens/UScreenEditSub.pas b/src/screens/UScreenEditSub.pas index 3eefc680..167d94b4 100644 --- a/src/screens/UScreenEditSub.pas +++ b/src/screens/UScreenEditSub.pas @@ -93,7 +93,6 @@ type Lyric: TEditorLyrics; - procedure NewBeat; procedure DivideBPM; procedure MultiplyBPM; procedure LyricsCapitalize; @@ -669,14 +668,15 @@ begin end; end; +{ procedure TScreenEditSub.NewBeat; begin - // click -{ for Pet := 0 to Lines[0].Line[Lines[0].Current].HighNut do - if (Lines[0].Line[Lines[0].Current].Note[Pet].Start = Czas.AktBeat) then begin - // old} -// Music.PlayClick; + // click + for Pet := 0 to Lines[0].Line[Lines[0].Current].HighNut do + if (Lines[0].Line[Lines[0].Current].Note[Pet].Start = Czas.AktBeat) then + Music.PlayClick; end; +} procedure TScreenEditSub.DivideBPM; var @@ -713,7 +713,7 @@ end; procedure TScreenEditSub.LyricsCapitalize; var C: integer; - N: integer; // temporary + //N: integer; // temporary S: string; begin // temporary @@ -925,7 +925,6 @@ procedure TScreenEditSub.DeleteNote; var C: integer; N: integer; - NLen: integer; begin C := Lines[0].Current; @@ -1230,9 +1229,6 @@ end; function TScreenEditSub.Draw: boolean; var - Min: integer; - Sec: integer; - Tekst: string; Pet: integer; AktBeat: integer; begin diff --git a/src/screens/UScreenOptionsRecord.pas b/src/screens/UScreenOptionsRecord.pas index 5681035f..b622f56c 100644 --- a/src/screens/UScreenOptionsRecord.pas +++ b/src/screens/UScreenOptionsRecord.pas @@ -739,7 +739,6 @@ end; function TScreenOptionsRecord.Draw: boolean; var - i: integer; Device: TAudioInputDevice; DeviceCfg: PInputDeviceConfig; SelectSlide: TSelectSlide; diff --git a/src/screens/UScreenOptionsThemes.pas b/src/screens/UScreenOptionsThemes.pas index 82d7d782..ec6fe014 100644 --- a/src/screens/UScreenOptionsThemes.pas +++ b/src/screens/UScreenOptionsThemes.pas @@ -154,8 +154,6 @@ begin end; constructor TScreenOptionsThemes.Create; -var - I: integer; begin inherited Create; diff --git a/src/screens/UScreenPartyNewRound.pas b/src/screens/UScreenPartyNewRound.pas index 3d518eca..01de9df7 100644 --- a/src/screens/UScreenPartyNewRound.pas +++ b/src/screens/UScreenPartyNewRound.pas @@ -153,8 +153,6 @@ begin end; constructor TScreenPartyNewRound.Create; -var - I: integer; begin inherited Create; @@ -217,7 +215,7 @@ var function GetTeamPlayers(const Num: Byte): String; var Players: Array of String; - J: Byte; + //J: Byte; begin // to-do : Party if (Num-1 >= {PartySession.Teams.NumTeams}0) then exit; diff --git a/src/screens/UScreenPartyOptions.pas b/src/screens/UScreenPartyOptions.pas index 9992fab5..fafae0e0 100644 --- a/src/screens/UScreenPartyOptions.pas +++ b/src/screens/UScreenPartyOptions.pas @@ -199,8 +199,6 @@ begin end; constructor TScreenPartyOptions.Create; -var - I: integer; begin inherited Create; //Fill IPlaylist diff --git a/src/screens/UScreenPartyPlayer.pas b/src/screens/UScreenPartyPlayer.pas index ca18bc18..d38a6435 100644 --- a/src/screens/UScreenPartyPlayer.pas +++ b/src/screens/UScreenPartyPlayer.pas @@ -75,7 +75,6 @@ uses UGraphic, UMain, UIni, UTexture, UParty; function TScreenPartyPlayer.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean; var -{*I, *}J: integer; // Auto Removed, Unused Variable (I) SDL_ModState: Word; procedure IntNext; begin diff --git a/src/screens/UScreenPopup.pas b/src/screens/UScreenPopup.pas index 4ef93549..bf4752b9 100644 --- a/src/screens/UScreenPopup.pas +++ b/src/screens/UScreenPopup.pas @@ -131,8 +131,6 @@ begin end; constructor TScreenPopupCheck.Create; -var - I: integer; begin inherited Create; @@ -214,8 +212,6 @@ begin end; constructor TScreenPopupError.Create; -var - I: integer; begin inherited Create; diff --git a/src/screens/UScreenSing.pas b/src/screens/UScreenSing.pas index b6384b79..5783366d 100644 --- a/src/screens/UScreenSing.pas +++ b/src/screens/UScreenSing.pas @@ -249,9 +249,6 @@ end; //Pause Mod End constructor TScreenSing.Create; -var - I: integer; - P: integer; begin inherited Create; @@ -314,7 +311,6 @@ var V2R: boolean; V2M: boolean; V3R: boolean; - NR: TRecR; //Some enlightment of who, how and what this is here please Color: TRGB; success: boolean; @@ -641,9 +637,6 @@ function TScreenSing.Draw: boolean; var Min: integer; Sec: integer; - Tekst: string; - Flash: real; - S: integer; T: integer; CurLyricsTime: real; begin @@ -931,8 +924,6 @@ end; // Called on sentence change // SentenceIndex: index of the new active sentence procedure TScreenSing.OnSentenceChange(SentenceIndex: cardinal); -var - LyricEngine: TLyricEngine; begin //GoldenStarsTwinkle GoldenRec.SentenceChange; diff --git a/src/screens/UScreenSongMenu.pas b/src/screens/UScreenSongMenu.pas index c536fd2d..7aa2e498 100644 --- a/src/screens/UScreenSongMenu.pas +++ b/src/screens/UScreenSongMenu.pas @@ -187,8 +187,6 @@ begin end; constructor TScreenSongMenu.Create; -var - I: integer; begin inherited Create; |