index 335fcba7289c27280927fb91186b7904f600052e..482a8f2a1a3b95ba01d9f61da9be14f7eabecb8d 100644 (file)
const
{* RWops Types *}
const
{* RWops Types *}
- SDL_RWOPS_UNKNOWN = 0; {* Unknown stream type *}
- SDL_RWOPS_WINFILE = 1; {* Win32 file *}
- SDL_RWOPS_STDFILE = 2; {* Stdio file *}
- SDL_RWOPS_JNIFILE = 3; {* Android asset *}
- SDL_RWOPS_MEMORY = 4; {* Memory stream *}
- SDL_RWOPS_MEMORY_RO = 5; {* Read-Only memory stream *}
+ SDL_RWOPS_UNKNOWN = 0; {* Unknown stream type *}
+ SDL_RWOPS_WINFILE = 1; {* Win32 file *}
+ SDL_RWOPS_STDFILE = 2; {* Stdio file *}
+ SDL_RWOPS_JNIFILE = 3; {* Android asset *}
+ SDL_RWOPS_MEMORY = 4; {* Memory stream *}
+ SDL_RWOPS_MEMORY_RO = 5; {* Read-Only memory stream *}
type
PSDL_RWops = ^TSDL_RWops;
type
PSDL_RWops = ^TSDL_RWops;
* the final offset in the data stream, or -1 on error.
*}
TSeek = function(context: PSDL_RWops; offset: SInt64; whence: SInt32): SInt64; {$IFNDEF GPC} cdecl; {$ENDIF}
* the final offset in the data stream, or -1 on error.
*}
TSeek = function(context: PSDL_RWops; offset: SInt64; whence: SInt32): SInt64; {$IFNDEF GPC} cdecl; {$ENDIF}
-
+
{**
* Read up to maxnum objects each of size size from the data
* stream to the area pointed at by ptr.
{**
* Read up to maxnum objects each of size size from the data
* stream to the area pointed at by ptr.
{**
* Write exactly num objects each of size size from the area
* pointed at by ptr to data stream.
{**
* Write exactly num objects each of size size from the area
* pointed at by ptr to data stream.
- *
+ *
* the number of objects written, or 0 at error or end of file.
*}
* the number of objects written, or 0 at error or end of file.
*}
-
+
TWrite = function(context: PSDL_RWops; const ptr: Pointer; size: size_t; num: size_t): size_t; {$IFNDEF GPC} cdecl; {$ENDIF}
TWrite = function(context: PSDL_RWops; const ptr: Pointer; size: size_t; num: size_t): size_t; {$IFNDEF GPC} cdecl; {$ENDIF}
-
+
{**
* Close and free an allocated SDL_RWops structure.
{**
* Close and free an allocated SDL_RWops structure.
- *
+ *
* 0 if successful or -1 on write error when flushing data.
*}
* 0 if successful or -1 on write error when flushing data.
*}
TStdio = record
autoclose: TSDL_Bool;
TStdio = record
autoclose: TSDL_Bool;
- fp: file;
+ fp: file;
end;
end;
-
+
TMem = record
base: PUInt8;
TMem = record
base: PUInt8;
- here: PUInt8;
- stop: PUInt8;
+ here: PUInt8;
+ stop: PUInt8;
end;
end;
-
+
TUnknown = record
data1: Pointer;
end;
TUnknown = record
data1: Pointer;
end;
TWindowsIOBuffer = record
data: Pointer;
TWindowsIOBuffer = record
data: Pointer;
- size: size_t;
- left: size_t;
+ size: size_t;
+ left: size_t;
end;
TWindowsIO = record
end;
TWindowsIO = record
_type: UInt32;
_type: UInt32;
- case Integer of
- 0: (stdio: TStdio);
- 1: (mem: TMem);
- 2: (unknown: TUnknown);
- {$IFDEF ANDROID}
- 3: (androidio: TAndroidIO);
- {$ENDIF}
- {$IFDEF WINDOWS}
- 3: (windowsio: TWindowsIO);
- {$ENDIF}
+ case Integer of
+ 0: (stdio: TStdio);
+ 1: (mem: TMem);
+ 2: (unknown: TUnknown);
+ {$IFDEF ANDROID}
+ 3: (androidio: TAndroidIO);
+ {$ENDIF}
+ {$IFDEF WINDOWS}
+ 3: (windowsio: TWindowsIO);
+ {$ENDIF}
end;
{**
end;
{**