49 procedure StoreRelease; |
49 procedure StoreRelease; |
50 procedure DrawSpriteFromRect(Sprite: TSprite; r: TSDL_Rect; X, Y, Height, Position: LongInt); |
50 procedure DrawSpriteFromRect(Sprite: TSprite; r: TSDL_Rect; X, Y, Height, Position: LongInt); |
51 procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt); |
51 procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt); |
52 procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt); |
52 procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt); |
53 procedure DrawSpriteClipped(Sprite: TSprite; X, Y, TopY, RightX, BottomY, LeftX: LongInt); |
53 procedure DrawSpriteClipped(Sprite: TSprite; X, Y, TopY, RightX, BottomY, LeftX: LongInt); |
54 procedure DrawSurfSprite(X, Y, Height, Frame: LongInt; Source: PTexture); |
|
55 procedure DrawTexture(X, Y: LongInt; Texture: PTexture); |
54 procedure DrawTexture(X, Y: LongInt; Texture: PTexture); |
56 procedure DrawTextureF(Texture: PTexture; Scale: GLfloat; X, Y, Frame, Dir, w, h: LongInt); |
55 procedure DrawTextureF(Texture: PTexture; Scale: GLfloat; X, Y, Frame, Dir, w, h: LongInt); |
57 procedure DrawRotatedTextureF(Texture: PTexture; Scale, OffsetX, OffsetY: GLfloat; X, Y, Frame, Dir, w, h: LongInt; Angle: real); |
56 procedure DrawRotatedTextureF(Texture: PTexture; Scale, OffsetX, OffsetY: GLfloat; X, Y, Frame, Dir, w, h: LongInt; Angle: real); |
58 procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real); |
57 procedure DrawRotated(Sprite: TSprite; X, Y, Dir: LongInt; Angle: real); |
59 procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real); |
58 procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real); |
691 r.y:= FrameY * SpritesData[Sprite].Height; |
690 r.y:= FrameY * SpritesData[Sprite].Height; |
692 r.h:= SpritesData[Sprite].Height; |
691 r.h:= SpritesData[Sprite].Height; |
693 DrawFromRect(X, Y, @r, SpritesData[Sprite].Texture) |
692 DrawFromRect(X, Y, @r, SpritesData[Sprite].Texture) |
694 end; |
693 end; |
695 |
694 |
696 procedure DrawSurfSprite(X, Y, Height, Frame: LongInt; Source: PTexture); |
|
697 var r: TSDL_Rect; |
|
698 begin |
|
699 r.x:= 0; |
|
700 r.w:= Source^.w; |
|
701 r.y:= Frame * Height; |
|
702 r.h:= Height; |
|
703 DrawFromRect(X, Y, @r, Source) |
|
704 end; |
|
705 |
|
706 procedure DrawCentered(X, Top: LongInt; Source: PTexture); |
695 procedure DrawCentered(X, Top: LongInt; Source: PTexture); |
707 begin |
696 begin |
708 DrawTexture(X - Source^.w shr 1, Top, Source) |
697 DrawTexture(X - Source^.w shr 1, Top, Source) |
709 end; |
698 end; |
710 |
699 |