29 procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt; Surface: PSDL_Surface); |
29 procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt; Surface: PSDL_Surface); |
30 procedure DrawSurfSprite(X, Y, Height, Frame: LongInt; Source: PTexture; Surface: PSDL_Surface); |
30 procedure DrawSurfSprite(X, Y, Height, Frame: LongInt; Source: PTexture; Surface: PSDL_Surface); |
31 procedure DrawLand (X, Y: LongInt); |
31 procedure DrawLand (X, Y: LongInt); |
32 procedure DrawTexture(X, Y: LongInt; Texture: PTexture); |
32 procedure DrawTexture(X, Y: LongInt; Texture: PTexture); |
33 procedure DrawRotated(Sprite: TSprite; X, Y: LongInt; Angle: real); |
33 procedure DrawRotated(Sprite: TSprite; X, Y: LongInt; Angle: real); |
|
34 procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame: LongInt; Angle: real); |
34 procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y: LongInt; Angle: real); |
35 procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y: LongInt; Angle: real); |
35 procedure DXOutText(X, Y: LongInt; Font: THWFont; s: string; Surface: PSDL_Surface); |
36 procedure DXOutText(X, Y: LongInt; Font: THWFont; s: string; Surface: PSDL_Surface); |
36 procedure DrawCentered(X, Top: LongInt; Source: PTexture); |
37 procedure DrawCentered(X, Top: LongInt; Source: PTexture); |
37 procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture; DestSurface: PSDL_Surface); |
38 procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture; DestSurface: PSDL_Surface); |
38 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Surface: PSDL_Surface); |
39 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Surface: PSDL_Surface); |
356 |
357 |
357 glEnd() |
358 glEnd() |
358 end; |
359 end; |
359 |
360 |
360 procedure DrawRotated(Sprite: TSprite; X, Y: LongInt; Angle: real); |
361 procedure DrawRotated(Sprite: TSprite; X, Y: LongInt; Angle: real); |
361 var hw, hh: LongInt; |
|
362 begin |
362 begin |
363 DrawRotatedTex(SpritesData[Sprite].Texture, |
363 DrawRotatedTex(SpritesData[Sprite].Texture, |
364 SpritesData[Sprite].Width, |
364 SpritesData[Sprite].Width, |
365 SpritesData[Sprite].Height, |
365 SpritesData[Sprite].Height, |
366 X, Y, Angle) |
366 X, Y, Angle) |
|
367 end; |
|
368 |
|
369 procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame: LongInt; Angle: real); |
|
370 begin |
|
371 glPushMatrix; |
|
372 glTranslatef(X - SpritesData[Sprite].Width div 2, Y - SpritesData[Sprite].Width div 2, 0); |
|
373 glRotatef(Angle, 0, 0, 1); |
|
374 |
|
375 DrawSprite(Sprite, 0, 0, Frame, nil); |
|
376 |
|
377 glPopMatrix |
367 end; |
378 end; |
368 |
379 |
369 procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y: LongInt; Angle: real); |
380 procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y: LongInt; Angle: real); |
370 begin |
381 begin |
371 glPushMatrix; |
382 glPushMatrix; |