Skip to content

Commit a3eaea3

Browse files
Update integer types (Cardinal to cuint32) for some types and macros
1 parent e0a3e70 commit a3eaea3

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

units/sdl2.pas

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,27 +353,27 @@ function SDL_AUDIO_ISUNSIGNED(x: Cardinal): Cardinal;
353353

354354
//from "sdl_pixels.h"
355355

356-
function SDL_PIXELFLAG(X: Cardinal): Cardinal;
356+
function SDL_PIXELFLAG(X: cuint32): cuint32;
357357
begin
358358
Result := (X shr 28) and $0F;
359359
end;
360360

361-
function SDL_PIXELTYPE(X: Cardinal): Cardinal;
361+
function SDL_PIXELTYPE(X: cuint32): cuint32;
362362
begin
363363
Result := (X shr 24) and $0F;
364364
end;
365365

366-
function SDL_PIXELORDER(X: Cardinal): Cardinal;
366+
function SDL_PIXELORDER(X: cuint32): cuint32;
367367
begin
368368
Result := (X shr 20) and $0F;
369369
end;
370370

371-
function SDL_PIXELLAYOUT(X: Cardinal): Cardinal;
371+
function SDL_PIXELLAYOUT(X: cuint32): cuint32;
372372
begin
373373
Result := (X shr 16) and $0F;
374374
end;
375375

376-
function SDL_BITSPERPIXEL(X: Cardinal): Cardinal;
376+
function SDL_BITSPERPIXEL(X: cuint32): cuint32;
377377
begin
378378
Result := (X shr 8) and $FF;
379379
end;

units/sdlpixels.inc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const
2020
type
2121
PPSDL_PixelType = ^PSDL_PixelType;
2222
PSDL_PixelType = ^TSDL_PixelType;
23-
TSDL_PixelType = type Cardinal;
23+
TSDL_PixelType = type cuint;
2424

2525
const
2626
SDL_PIXELTYPE_UNKNOWN = TSDL_PixelType(0);
@@ -40,7 +40,7 @@ const
4040
type
4141
PPSDL_BitmapOrder = ^PSDL_BitmapOrder;
4242
PSDL_BitmapOrder = ^TSDL_BitmapOrder;
43-
TSDL_BitmapOrder = type Cardinal;
43+
TSDL_BitmapOrder = type cuint32;
4444

4545
const
4646
SDL_BITMAPORDER_NONE = TSDL_BitmapOrder(0);
@@ -51,7 +51,7 @@ const
5151
type
5252
PPSDL_PackOrder = ^PSDL_PackOrder;
5353
PSDL_PackOrder = ^TSDL_PackOrder;
54-
TSDL_PackOrder = type Cardinal;
54+
TSDL_PackOrder = type cuint32;
5555

5656
const
5757
SDL_PACKEDORDER_NONE = TSDL_PackOrder(0);
@@ -68,7 +68,7 @@ const
6868
type
6969
PPSDL_ArrayOrder = ^PSDL_ArrayOrder;
7070
PSDL_ArrayOrder = ^TSDL_ArrayOrder;
71-
TSDL_ArrayOrder = type Cardinal;
71+
TSDL_ArrayOrder = type cuint32;
7272

7373
const
7474
SDL_ARRAYORDER_NONE = TSDL_ArrayOrder(0);
@@ -83,7 +83,7 @@ const
8383
type
8484
PPSDL_PackedLayout = ^PSDL_PackedLayout;
8585
PSDL_PackedLayout = ^TSDL_PackedLayout;
86-
TSDL_PackedLayout = type Cardinal;
86+
TSDL_PackedLayout = type cuint32;
8787

8888
const
8989
SDL_PACKEDLAYOUT_NONE = TSDL_PackedLayout(0);
@@ -107,11 +107,11 @@ function SDL_DEFINE_PIXELFOURCC(A,B,C,D: Variant): Variant;
107107
((bits) << 8) | ((bytes) << 0))
108108
}
109109

110-
function SDL_PIXELFLAG(X: Cardinal): Cardinal;
111-
function SDL_PIXELTYPE(X: Cardinal): Cardinal;
112-
function SDL_PIXELORDER(X: Cardinal): Cardinal;
113-
function SDL_PIXELLAYOUT(X: Cardinal): Cardinal;
114-
function SDL_BITSPERPIXEL(X: Cardinal): Cardinal;
110+
function SDL_PIXELFLAG(X: cuint32): cuint32;
111+
function SDL_PIXELTYPE(X: cuint32): cuint32;
112+
function SDL_PIXELORDER(X: cuint32): cuint32;
113+
function SDL_PIXELLAYOUT(X: cuint32): cuint32;
114+
function SDL_BITSPERPIXEL(X: cuint32): cuint32;
115115
{
116116
#define SDL_BYTESPERPIXEL(X) \
117117
(SDL_ISPIXELFORMAT_FOURCC(X) ? \

0 commit comments

Comments
 (0)