2 ITEM(dogtorso
, normaltorso
)
5 virtual void Draw(blitdata
&) const;
6 virtual int GetClassAnimationFrames() const { return 16; }
7 virtual v2
GetBitmapPos(int) const;
15 v2
dogtorso::GetBitmapPos(int Frame
) const
17 v2 BasePos
= torso::GetBitmapPos(Frame
);
19 if(Frame
>= GraphicData
.AnimationFrames
>> 1)
22 return v2(BasePos
.X
+ ((Frame
& 4) << 2), BasePos
.Y
);
27 void dogtorso::Draw(blitdata
& BlitData
) const
29 cint AF
= GraphicData
.AnimationFrames
>> 1;
30 int Index
= !(BlitData
.CustomData
& ALLOW_ANIMATE
) || AF
== 1 ? 0 : GET_TICK() & (AF
- 1);
32 if(GetHP() << 1 <= GetMaxHP())
35 cbitmap
* P
= GraphicData
.Picture
[Index
];
37 if(BlitData
.CustomData
& ALLOW_ALPHA
)
38 P
->AlphaPriorityBlit(BlitData
);
40 P
->MaskedPriorityBlit(BlitData
);