X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_panel.pas;h=38e0ac209bbec5a50aec972c13a7da2ceefb9967;hb=987c4a835a103345b59937e8e1be8524a6228712;hp=c95c271c289aff596bbc6b0b5b9f33750b09e7be;hpb=f4fc3b435118e5d9e4085da37014436d2e063259;p=d2df-sdl.git diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index c95c271..38e0ac2 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -2,8 +2,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * the Free Software Foundation, version 3 of the License ONLY. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -204,6 +203,12 @@ type TPanelArray = Array of TPanel; +const + LIFTTYPE_UP = 0; + LIFTTYPE_DOWN = 1; + LIFTTYPE_LEFT = 2; + LIFTTYPE_RIGHT = 3; + var g_dbgpan_mplat_active: Boolean = {$IF DEFINED(D2F_DEBUG)}true{$ELSE}true{$ENDIF}; g_dbgpan_mplat_step: Boolean = false; // one step, and stop @@ -212,11 +217,7 @@ var implementation uses -{$IFDEF USE_NANOGL} - nanoGL, -{$ELSE} - GL, -{$ENDIF} + {$INCLUDE ../nogl/noGLuses.inc} e_texture, g_basic, g_map, g_game, g_gfx, e_graphics, g_weapons, g_triggers, g_console, g_language, g_monsters, g_player, g_grid, e_log, geom, utils, xstreams; @@ -265,16 +266,16 @@ begin PanelType := PanelRec.PanelType; Enabled := True; Door := False; - LiftType := 0; + LiftType := LIFTTYPE_UP; hasTexTrigger := False; case PanelType of PANEL_OPENDOOR: begin Enabled := False; Door := True; end; PANEL_CLOSEDOOR: Door := True; - PANEL_LIFTUP: LiftType := 0; //??? - PANEL_LIFTDOWN: LiftType := 1; - PANEL_LIFTLEFT: LiftType := 2; - PANEL_LIFTRIGHT: LiftType := 3; + PANEL_LIFTUP: LiftType := LIFTTYPE_UP; //??? + PANEL_LIFTDOWN: LiftType := LIFTTYPE_DOWN; + PANEL_LIFTLEFT: LiftType := LIFTTYPE_LEFT; + PANEL_LIFTRIGHT: LiftType := LIFTTYPE_RIGHT; end; // Íåâèäèìàÿ: @@ -906,7 +907,7 @@ begin (FTextureIDs[FCurTexture].AnTex <> nil) and (Width > 0) and (Height > 0) and (FAlpha < 255) then begin - FCurFrame := ClampInt(Frame, 0, FTextureIDs[FCurTexture].AnTex.TotalFrames); + FCurFrame := ClampInt(Frame, 0, FTextureIDs[FCurTexture].AnTex.TotalFrames - 1); FCurFrameCount := Count; FTextureIDs[FCurTexture].AnTex.CurrentFrame := FCurFrame; FTextureIDs[FCurTexture].AnTex.CurrentCounter := FCurFrameCount;