X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame%2Fg_panel.pas;h=c95c271c289aff596bbc6b0b5b9f33750b09e7be;hb=ee093c74b7f323b8589dc39ca7c39e89bc6e7e63;hp=d0eb1ce7dc3ed2ec7e4b5f0e6ac6f12b96a6fccc;hpb=785fe3df9d3c82df346034780156cb63bae43ff7;p=d2df-sdl.git diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas index d0eb1ce..c95c271 100644 --- a/src/game/g_panel.pas +++ b/src/game/g_panel.pas @@ -212,8 +212,13 @@ var implementation uses +{$IFDEF USE_NANOGL} + nanoGL, +{$ELSE} + GL, +{$ENDIF} 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, GL, geom, utils, xstreams; + g_console, g_language, g_monsters, g_player, g_grid, e_log, geom, utils, xstreams; const PANEL_SIGNATURE = $4C4E4150; // 'PANL' @@ -957,22 +962,8 @@ end; procedure TPanel.SetTexture(ID: Integer; AnimLoop: Byte = 0); begin -// Íåò òåêñòóð: - if Length(FTextureIDs) = 0 then - FCurTexture := -1 - else - // Òîëüêî îäíà òåêñòóðà: - if Length(FTextureIDs) = 1 then - begin - if (ID = 0) or (ID = -1) then - FCurTexture := ID; - end - else - // Áîëüøå îäíîé òåêñòóðû: - begin - if (ID >= -1) and (ID <= High(FTextureIDs)) then - FCurTexture := ID; - end; + if (ID >= -1) and (ID < Length(FTextureIDs)) then + FCurTexture := ID; // Ïåðåêëþ÷èëèñü íà âèäèìóþ àíèì. òåêñòóðó: if (FCurTexture >= 0) and FTextureIDs[FCurTexture].Anim then