aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-03-09 18:52:02 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-03-09 18:52:02 +0000
commit5493dcdf6ace3edb2c45b727aa5e580714de8709 (patch)
tree8080d7acb1b5f6b30427f2046407b3b430204fbc /Game
parent65ba06b73c91c92a99f2ed88432e05a1b694531d (diff)
downloadusdx-5493dcdf6ace3edb2c45b727aa5e580714de8709.tar.gz
usdx-5493dcdf6ace3edb2c45b727aa5e580714de8709.tar.xz
usdx-5493dcdf6ace3edb2c45b727aa5e580714de8709.zip
Fixed some warnings ("missing result-values", "0 instead of nil", "comparison is always true", "range check errors")
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@947 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Classes/UTexture.pas4
-rw-r--r--Game/Code/Classes/UVideo.pas4
2 files changed, 6 insertions, 2 deletions
diff --git a/Game/Code/Classes/UTexture.pas b/Game/Code/Classes/UTexture.pas
index 02fb8e52..828a53e8 100644
--- a/Game/Code/Classes/UTexture.pas
+++ b/Game/Code/Classes/UTexture.pas
@@ -1144,14 +1144,14 @@ end;
procedure TTextureUnit.UnloadTexture(Name: string; FromCache: boolean);
var
T: integer;
- TexNum: GLuint;
+ TexNum: integer;
begin
T := FindTexture(Name);
if not FromCache then begin
TexNum := TextureDatabase.Texture[T].Texture.TexNum;
if TexNum >= 0 then begin
- glDeleteTextures(1, @TexNum);
+ glDeleteTextures(1, PGLuint(@TexNum));
TextureDatabase.Texture[T].Texture.TexNum := -1;
// Log.LogError('Unload texture no '+IntToStr(TexNum));
end;
diff --git a/Game/Code/Classes/UVideo.pas b/Game/Code/Classes/UVideo.pas
index 7f595928..15399110 100644
--- a/Game/Code/Classes/UVideo.pas
+++ b/Game/Code/Classes/UVideo.pas
@@ -445,6 +445,8 @@ var
sws_dst_w, sws_dst_h: Integer;
begin
+ Result := false;
+
fVideoOpened := False;
fVideoPaused := False;
VideoTimeBase := 0;
@@ -646,6 +648,8 @@ begin
end;
end;
end;
+
+ Result := true;
end;
procedure TVideoPlayback_ffmpeg.Close;