X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_textures.pas;h=d35fc53be4c961ae19e62c0e973b206c1720d887;hb=dc37333a08186fc9d9ceffb8b7a0b49534fcf5ee;hp=acac0c61d3b8a87cc78bc9598d65d834ef6817c2;hpb=e575ce001fa1150001a91db8c019f72a5ff48b32;p=d2df-sdl.git diff --git a/src/game/g_textures.pas b/src/game/g_textures.pas index acac0c6..d35fc53 100644 --- a/src/game/g_textures.pas +++ b/src/game/g_textures.pas @@ -24,11 +24,10 @@ uses type TLevelTexture = record - textureName: AnsiString; - width, height: Word; + TextureName: AnsiString; // as stored in wad + FullName: AnsiString; // full path to texture // !!! merge it with TextureName case anim: Boolean of - false: (textureID: LongWord); - true: (framesID: LongWord; framesCount: Byte; speed: Byte); + true: (framesCount: Byte; speed: Byte); end; TLevelTextureArray = array of TLevelTexture; @@ -61,7 +60,7 @@ type procedure saveState (st: TStream); procedure loadState (st: TStream); -// function totalFrames (): Integer; inline; + function totalFrames (): Integer; inline; public property played: Boolean read mPlayed; @@ -236,6 +235,11 @@ begin reset end; +function TAnimationState.totalFrames (): Integer; inline; +begin + result := mLength +end; + procedure TAnimationState.saveState (st: TStream); begin if (st = nil) then exit;