42 procedure DrawTextureRotatedF (Texture: PTexture; Scale, OffsetX, OffsetY: GLfloat; X, Y, Frame, Dir, w, h: LongInt; Angle: real); |
42 procedure DrawTextureRotatedF (Texture: PTexture; Scale, OffsetX, OffsetY: GLfloat; X, Y, Frame, Dir, w, h: LongInt; Angle: real); |
43 |
43 |
44 procedure DrawCircle (X, Y, Radius, Width: LongInt); |
44 procedure DrawCircle (X, Y, Radius, Width: LongInt); |
45 procedure DrawCircle (X, Y, Radius, Width: LongInt; r, g, b, a: Byte); |
45 procedure DrawCircle (X, Y, Radius, Width: LongInt; r, g, b, a: Byte); |
46 |
46 |
|
47 procedure DrawLine (X0, Y0, X1, Y1, Width: Single; color: LongWord); inline; |
47 procedure DrawLine (X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte); |
48 procedure DrawLine (X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte); |
48 procedure DrawFillRect (r: TSDL_Rect); |
49 procedure DrawFillRect (r: TSDL_Rect); |
49 procedure DrawHedgehog (X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real); |
50 procedure DrawHedgehog (X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real); |
50 procedure DrawScreenWidget (widget: POnScreenWidget); |
51 procedure DrawScreenWidget (widget: POnScreenWidget); |
51 |
52 |
346 else |
347 else |
347 scale:= 1.0; |
348 scale:= 1.0; |
348 DrawTexture(X - round(Source^.w * scale) div 2, Top, Source, scale) |
349 DrawTexture(X - round(Source^.w * scale) div 2, Top, Source, scale) |
349 end; |
350 end; |
350 |
351 |
|
352 procedure DrawLine(X0, Y0, X1, Y1, Width: Single; color: LongWord); inline; |
|
353 begin |
|
354 DrawLine(X0, Y0, X1, Y1, Width, (color shr 24) and $FF, (color shr 16) and $FF, (color shr 8) and $FF, color and $FF) |
|
355 end; |
|
356 |
351 procedure DrawLine(X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte); |
357 procedure DrawLine(X0, Y0, X1, Y1, Width: Single; r, g, b, a: Byte); |
352 var VertexBuffer: array [0..1] of TVertex2f; |
358 var VertexBuffer: array [0..1] of TVertex2f; |
353 begin |
359 begin |
354 glDisable(GL_TEXTURE_2D); |
360 glDisable(GL_TEXTURE_2D); |
355 glEnable(GL_LINE_SMOOTH); |
361 glEnable(GL_LINE_SMOOTH); |
531 end; |
537 end; |
532 |
538 |
533 procedure Tint(r, g, b, a: Byte); inline; |
539 procedure Tint(r, g, b, a: Byte); inline; |
534 var nc, tw: Longword; |
540 var nc, tw: Longword; |
535 begin |
541 begin |
536 nc:= (a shl 24) or (b shl 16) or (g shl 8) or r; |
542 nc:= (r shl 24) or (g shl 16) or (b shl 8) or a; |
537 |
543 |
538 if nc = lastTint then |
544 if nc = lastTint then |
539 exit; |
545 exit; |
540 |
546 |
541 if GrayScale then |
547 if GrayScale then |