X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_panel.pas;h=fa4429256576dd18b109dd5ddaf4fbfe9871ac28;hp=d3e4414dc0832afd57c95d541cc5e018e8d858e1;hb=dc37333a08186fc9d9ceffb8b7a0b49534fcf5ee;hpb=16333a342f6a12afee83673e55a123f6b700a804 diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index d3e4414..fa44292 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -41,8 +41,6 @@ type const private mGUID: Integer; // will be assigned in "g_map.pas" - FTextureWidth: Word; - FTextureHeight: Word; FAlpha: Byte; FBlending: Boolean; FTextureIDs: ATextureID; @@ -189,8 +187,6 @@ type (* private state *) property Alpha: Byte read FAlpha; - property TextureWidth: Word read FTextureWidth; - property TextureHeight: Word read FTextureHeight; property Blending: Boolean read FBlending; property TextureIDs: ATextureID read FTextureIDs; @@ -357,15 +353,11 @@ begin if ({PanelRec.TextureNum}tnum > High(Textures)) then begin e_WriteLog(Format('WTF?! tnum is out of limits! (%d : %d)', [tnum, High(Textures)]), TMsgType.Warning); - FTextureWidth := 2; - FTextureHeight := 2; FAlpha := 0; FBlending := ByteBool(0); end else if not g_Map_IsSpecialTexture(Textures[{PanelRec.TextureNum}tnum].TextureName) then begin - FTextureWidth := Textures[{PanelRec.TextureNum}tnum].Width; - FTextureHeight := Textures[{PanelRec.TextureNum}tnum].Height; FAlpha := PanelRec.Alpha; FBlending := ByteBool(PanelRec.Flags and PANEL_FLAG_BLENDING); end; @@ -887,12 +879,12 @@ end; function TPanel.GetTextureID(): DWORD; begin Result := LongWord(TEXTURE_NONE); - if (FCurTexture >= 0) then - begin - if FTextureIDs[FCurTexture].Anim then - Result := Textures[FTextureIDs[FCurTexture].Texture].FramesID - else - Result := Textures[FTextureIDs[FCurTexture].Texture].TextureID +// if (FCurTexture >= 0) then +// begin +// if FTextureIDs[FCurTexture].Anim then +// Result := Textures[FTextureIDs[FCurTexture].Texture].FramesID +// else +// Result := Textures[FTextureIDs[FCurTexture].Texture].TextureID { // !!! old behavior if FTextureIDs[FCurTexture].Anim then @@ -900,7 +892,7 @@ begin else Result := FTextureIDs[FCurTexture].Tex; } - end +// end end; function TPanel.GetTextureCount(): Integer;