X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_textures.pas;h=b8ebfa0f563d55374148ba1d46bf9da1b866b17c;hb=5c816a8e702fd39c65d0928a3315d81e979f30fb;hp=87893c2a9cc22089e60ac02798d1bbbdf2e097a2;hpb=987c4a835a103345b59937e8e1be8524a6228712;p=d2df-sdl.git diff --git a/src/game/g_textures.pas b/src/game/g_textures.pas index 87893c2..b8ebfa0 100644 --- a/src/game/g_textures.pas +++ b/src/game/g_textures.pas @@ -20,7 +20,7 @@ interface uses SysUtils, Classes, {$IFDEF USE_MEMPOOL}mempool,{$ENDIF} - e_graphics, MAPDEF, ImagingTypes, Imaging, ImagingUtility; + r_graphics, MAPDEF, ImagingTypes, Imaging, ImagingUtility; type TLevelTexture = record @@ -737,7 +737,13 @@ end; constructor TAnimation.Create (aframesID: LongWord; aloop: Boolean; aspeed: Byte); begin - if (aframesID >= Length(framesArray)) then raise Exception.Create('trying to create inexisting frame: something is very wrong here'); + if (aframesID >= Length(framesArray)) then + begin + //raise Exception.Create('trying to create inexisting frame: something is very wrong here'); + e_LogWritefln('trying to create inexisting frame %u of %u: something is very wrong here', [aframesID, LongWord(Length(framesArray))], TMsgType.Warning); + aframesID := 0; + if (Length(framesArray) = 0) then raise Exception.Create('trying to create inexisting frame: something is very wrong here'); + end; mId := aframesID; mMinLength := 0; mLoop := aloop;