mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 00:19:19 +02:00
+ adapted SDL package to user PowerSDL headers on MorphOS.
git-svn-id: trunk@16205 -
This commit is contained in:
parent
56913ebf91
commit
2d9d71e976
@ -23,6 +23,9 @@ unit sdl_gfx;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
exec,
|
||||||
|
{$ENDIF}
|
||||||
sdl;
|
sdl;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -42,6 +45,10 @@ const
|
|||||||
SDLgfxLibName = 'SDL_gfx';
|
SDLgfxLibName = 'SDL_gfx';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
SDLgfxLibName = 'powersdl_gfx.library';
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
// Some rates in Hz
|
// Some rates in Hz
|
||||||
FPS_UPPER_LIMIT = 200;
|
FPS_UPPER_LIMIT = 200;
|
||||||
FPS_LOWER_LIMIT = 1;
|
FPS_LOWER_LIMIT = 1;
|
||||||
@ -77,6 +84,10 @@ type
|
|||||||
y : Uint8;
|
y : Uint8;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
{$INCLUDE powersdl_gfx.inc}
|
||||||
|
{$ELSE MORPHOS}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
SDL_framerate: framerate manager
|
SDL_framerate: framerate manager
|
||||||
@ -686,6 +697,8 @@ procedure zoomSurfaceSize( width : integer; height : integer; zoomx : double; zo
|
|||||||
cdecl; external {$IFDEF __GPC__}name 'zoomSurfaceSize'{$ELSE} SDLgfxLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'zoomSurfaceSize'{$ELSE} SDLgfxLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM zoomSurfaceSize}
|
{$EXTERNALSYM zoomSurfaceSize}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
end.
|
end.
|
@ -161,6 +161,9 @@ uses
|
|||||||
{$IFNDEF no_smpeg}
|
{$IFNDEF no_smpeg}
|
||||||
smpeg,
|
smpeg,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
exec,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
sdl;
|
sdl;
|
||||||
|
|
||||||
@ -185,6 +188,10 @@ const
|
|||||||
SDL_MixerLibName = 'SDL_mixer';
|
SDL_MixerLibName = 'SDL_mixer';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF MACOS}
|
||||||
|
SDL_MixerLibName = 'powersdl_mixer.library';
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *}
|
{* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *}
|
||||||
SDL_MIXER_MAJOR_VERSION = 1;
|
SDL_MIXER_MAJOR_VERSION = 1;
|
||||||
{$EXTERNALSYM MIX_MAJOR_VERSION}
|
{$EXTERNALSYM MIX_MAJOR_VERSION}
|
||||||
@ -478,6 +485,10 @@ type
|
|||||||
procedure SDL_MIXER_VERSION(var X: TSDL_Version);
|
procedure SDL_MIXER_VERSION(var X: TSDL_Version);
|
||||||
{$EXTERNALSYM SDL_MIXER_VERSION}
|
{$EXTERNALSYM SDL_MIXER_VERSION}
|
||||||
|
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
{$INCLUDE powersdl_mixer.inc}
|
||||||
|
{$ELSE MORPHOS}
|
||||||
|
|
||||||
{ This function gets the version of the dynamically linked SDL_mixer library.
|
{ This function gets the version of the dynamically linked SDL_mixer library.
|
||||||
It should NOT be used to fill a version structure, instead you should use the
|
It should NOT be used to fill a version structure, instead you should use the
|
||||||
SDL_MIXER_VERSION() macro. }
|
SDL_MIXER_VERSION() macro. }
|
||||||
@ -570,6 +581,8 @@ function Mix_GetMusicHookData : Pointer;
|
|||||||
cdecl; external {$IFDEF __GPC__}name 'Mix_GetMusicHookData'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'Mix_GetMusicHookData'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM Mix_GetMusicHookData}
|
{$EXTERNALSYM Mix_GetMusicHookData}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
{* Add your own callback when a channel has finished playing. NULL
|
{* Add your own callback when a channel has finished playing. NULL
|
||||||
* to disable callback.*}
|
* to disable callback.*}
|
||||||
type
|
type
|
||||||
@ -579,10 +592,14 @@ type
|
|||||||
TChannel_finished = procedure( channel: Integer );
|
TChannel_finished = procedure( channel: Integer );
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFNDEF MORPHOS}
|
||||||
|
|
||||||
procedure Mix_ChannelFinished( channel_finished : TChannel_finished );
|
procedure Mix_ChannelFinished( channel_finished : TChannel_finished );
|
||||||
cdecl; external {$IFDEF __GPC__}name 'Mix_ChannelFinished'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'Mix_ChannelFinished'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM Mix_ChannelFinished}
|
{$EXTERNALSYM Mix_ChannelFinished}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
const
|
const
|
||||||
MIX_CHANNEL_POST = -2;
|
MIX_CHANNEL_POST = -2;
|
||||||
|
|
||||||
@ -663,6 +680,9 @@ type
|
|||||||
* returns zero if error (no such channel), nonzero if added.
|
* returns zero if error (no such channel), nonzero if added.
|
||||||
* Error messages can be retrieved from Mix_GetError().
|
* Error messages can be retrieved from Mix_GetError().
|
||||||
*}
|
*}
|
||||||
|
|
||||||
|
{$IFNDEF MORPHOS}
|
||||||
|
|
||||||
function Mix_RegisterEffect( chan : integer; f : TMix_EffectFunc; d : TMix_EffectDone; arg : Pointer ) : integer;
|
function Mix_RegisterEffect( chan : integer; f : TMix_EffectFunc; d : TMix_EffectDone; arg : Pointer ) : integer;
|
||||||
cdecl; external {$IFDEF __GPC__}name 'Mix_RegisterEffect'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'Mix_RegisterEffect'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM Mix_RegisterEffect}
|
{$EXTERNALSYM Mix_RegisterEffect}
|
||||||
@ -694,9 +714,12 @@ function Mix_UnregisterAllEffects( channel : integer ) : integer;
|
|||||||
cdecl; external {$IFDEF __GPC__}name 'Mix_UnregisterAllEffects'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'Mix_UnregisterAllEffects'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM Mix_UnregisterAllEffects}
|
{$EXTERNALSYM Mix_UnregisterAllEffects}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
const
|
const
|
||||||
MIX_EFFECTSMAXSPEED = 'MIX_EFFECTSMAXSPEED';
|
MIX_EFFECTSMAXSPEED = 'MIX_EFFECTSMAXSPEED';
|
||||||
|
|
||||||
|
{$IFNDEF MORPHOS}
|
||||||
{*
|
{*
|
||||||
* These are the internally - defined mixing effects.They use the same API that
|
* These are the internally - defined mixing effects.They use the same API that
|
||||||
* effects defined in the application use, but are provided here as a
|
* effects defined in the application use, but are provided here as a
|
||||||
@ -1069,6 +1092,8 @@ procedure Mix_CloseAudio;
|
|||||||
cdecl; external {$IFDEF __GPC__}name 'Mix_CloseAudio'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'Mix_CloseAudio'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM Mix_CloseAudio}
|
{$EXTERNALSYM Mix_CloseAudio}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
{ We'll use SDL for reporting errors }
|
{ We'll use SDL for reporting errors }
|
||||||
procedure Mix_SetError( fmt : PChar );
|
procedure Mix_SetError( fmt : PChar );
|
||||||
|
|
||||||
|
@ -10,6 +10,9 @@ interface
|
|||||||
uses
|
uses
|
||||||
{$IFDEF __GPC__}
|
{$IFDEF __GPC__}
|
||||||
gpc,
|
gpc,
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
exec,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
sdl;
|
sdl;
|
||||||
|
|
||||||
@ -34,6 +37,10 @@ const
|
|||||||
SDL_MixerLibName = 'SDL_mixer';
|
SDL_MixerLibName = 'SDL_mixer';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
SDL_MixerLibName = 'powersdl_mixer.library';
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *}
|
{* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *}
|
||||||
SDL_MIXER_MAJOR_VERSION = 1;
|
SDL_MIXER_MAJOR_VERSION = 1;
|
||||||
{$EXTERNALSYM MIX_MAJOR_VERSION}
|
{$EXTERNALSYM MIX_MAJOR_VERSION}
|
||||||
@ -323,6 +330,10 @@ type
|
|||||||
procedure SDL_MIXER_VERSION(var X: TSDL_Version);
|
procedure SDL_MIXER_VERSION(var X: TSDL_Version);
|
||||||
{$EXTERNALSYM SDL_MIXER_VERSION}
|
{$EXTERNALSYM SDL_MIXER_VERSION}
|
||||||
|
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
{$INCLUDE powersdl_mixer.inc}
|
||||||
|
{$ELSE MORPHOS}
|
||||||
|
|
||||||
{ This function gets the version of the dynamically linked SDL_mixer library.
|
{ This function gets the version of the dynamically linked SDL_mixer library.
|
||||||
It should NOT be used to fill a version structure, instead you should use the
|
It should NOT be used to fill a version structure, instead you should use the
|
||||||
SDL_MIXER_VERSION() macro. }
|
SDL_MIXER_VERSION() macro. }
|
||||||
@ -415,6 +426,8 @@ function Mix_GetMusicHookData : Pointer;
|
|||||||
cdecl; external {$IFDEF __GPC__}name 'Mix_GetMusicHookData'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'Mix_GetMusicHookData'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM Mix_GetMusicHookData}
|
{$EXTERNALSYM Mix_GetMusicHookData}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
{* Add your own callback when a channel has finished playing. NULL
|
{* Add your own callback when a channel has finished playing. NULL
|
||||||
* to disable callback.*}
|
* to disable callback.*}
|
||||||
type
|
type
|
||||||
@ -424,10 +437,14 @@ type
|
|||||||
TChannel_finished = procedure( channel: Integer );
|
TChannel_finished = procedure( channel: Integer );
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFNDEF MORPHOS}
|
||||||
|
|
||||||
procedure Mix_ChannelFinished( channel_finished : TChannel_finished );
|
procedure Mix_ChannelFinished( channel_finished : TChannel_finished );
|
||||||
cdecl; external {$IFDEF __GPC__}name 'Mix_ChannelFinished'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'Mix_ChannelFinished'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM Mix_ChannelFinished}
|
{$EXTERNALSYM Mix_ChannelFinished}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
const
|
const
|
||||||
MIX_CHANNEL_POST = -2;
|
MIX_CHANNEL_POST = -2;
|
||||||
|
|
||||||
@ -508,6 +525,8 @@ type
|
|||||||
* returns zero if error (no such channel), nonzero if added.
|
* returns zero if error (no such channel), nonzero if added.
|
||||||
* Error messages can be retrieved from Mix_GetError().
|
* Error messages can be retrieved from Mix_GetError().
|
||||||
*}
|
*}
|
||||||
|
{$IFNDEF MORPHOS}
|
||||||
|
|
||||||
function Mix_RegisterEffect( chan : integer; f : TMix_EffectFunc; d : TMix_EffectDone; arg : Pointer ) : integer;
|
function Mix_RegisterEffect( chan : integer; f : TMix_EffectFunc; d : TMix_EffectDone; arg : Pointer ) : integer;
|
||||||
cdecl; external {$IFDEF __GPC__}name 'Mix_RegisterEffect'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'Mix_RegisterEffect'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM Mix_RegisterEffect}
|
{$EXTERNALSYM Mix_RegisterEffect}
|
||||||
@ -539,9 +558,12 @@ function Mix_UnregisterAllEffects( channel : integer ) : integer;
|
|||||||
cdecl; external {$IFDEF __GPC__}name 'Mix_UnregisterAllEffects'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'Mix_UnregisterAllEffects'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM Mix_UnregisterAllEffects}
|
{$EXTERNALSYM Mix_UnregisterAllEffects}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
const
|
const
|
||||||
MIX_EFFECTSMAXSPEED = 'MIX_EFFECTSMAXSPEED';
|
MIX_EFFECTSMAXSPEED = 'MIX_EFFECTSMAXSPEED';
|
||||||
|
|
||||||
|
{$IFNDEF MORPHOS}
|
||||||
{*
|
{*
|
||||||
* These are the internally - defined mixing effects.They use the same API that
|
* These are the internally - defined mixing effects.They use the same API that
|
||||||
* effects defined in the application use, but are provided here as a
|
* effects defined in the application use, but are provided here as a
|
||||||
@ -914,6 +936,8 @@ procedure Mix_CloseAudio;
|
|||||||
cdecl; external {$IFDEF __GPC__}name 'Mix_CloseAudio'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'Mix_CloseAudio'{$ELSE} SDL_MixerLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM Mix_CloseAudio}
|
{$EXTERNALSYM Mix_CloseAudio}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
{ We'll use SDL for reporting errors }
|
{ We'll use SDL for reporting errors }
|
||||||
procedure Mix_SetError( fmt : PChar );
|
procedure Mix_SetError( fmt : PChar );
|
||||||
|
|
||||||
|
@ -124,6 +124,10 @@ uses
|
|||||||
{$IFNDEF __GPC__}
|
{$IFNDEF __GPC__}
|
||||||
Windows,
|
Windows,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
exec,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
sdl;
|
sdl;
|
||||||
|
|
||||||
@ -144,6 +148,10 @@ const
|
|||||||
SDLNetLibName = 'SDL_net';
|
SDLNetLibName = 'SDL_net';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF MACOS}
|
||||||
|
SDLNetLibName = 'powersdl_net.library';
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *}
|
{* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *}
|
||||||
SDL_NET_MAJOR_VERSION = 1;
|
SDL_NET_MAJOR_VERSION = 1;
|
||||||
{$EXTERNALSYM SDL_NET_MAJOR_VERSION}
|
{$EXTERNALSYM SDL_NET_MAJOR_VERSION}
|
||||||
@ -268,6 +276,10 @@ type
|
|||||||
procedure SDL_NET_VERSION( var X : TSDL_version );
|
procedure SDL_NET_VERSION( var X : TSDL_version );
|
||||||
{$EXTERNALSYM SDL_NET_VERSION}
|
{$EXTERNALSYM SDL_NET_VERSION}
|
||||||
|
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
{$INCLUDE powersdl_net.inc}
|
||||||
|
{$ELSE MORPHOS}
|
||||||
|
|
||||||
{* Initialize/Cleanup the network API
|
{* Initialize/Cleanup the network API
|
||||||
SDL must be initialized before calls to functions in this library,
|
SDL must be initialized before calls to functions in this library,
|
||||||
because this library uses utility functions from the SDL library.
|
because this library uses utility functions from the SDL library.
|
||||||
@ -494,10 +506,11 @@ function SDLNet_AddSocket( set_ : PSDLNet_SocketSet; sock : PSDLNet_GenericSocke
|
|||||||
cdecl; external{$IFDEF __GPC__}name 'SDLNet_AddSocket'{$ELSE}SDLNetLibName{$ENDIF __GPC__};
|
cdecl; external{$IFDEF __GPC__}name 'SDLNet_AddSocket'{$ELSE}SDLNetLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM SDLNet_AddSocket}
|
{$EXTERNALSYM SDLNet_AddSocket}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
function SDLNet_TCP_AddSocket( set_ : PSDLNet_SocketSet; sock : PTCPSocket ) : integer;
|
function SDLNet_TCP_AddSocket( set_ : PSDLNet_SocketSet; sock : PTCPSocket ) : integer;
|
||||||
|
|
||||||
function SDLNet_UDP_AddSocket( set_ : PSDLNet_SocketSet; sock : PUDPSocket ) : integer;
|
function SDLNet_UDP_AddSocket( set_ : PSDLNet_SocketSet; sock : PUDPSocket ) : integer;
|
||||||
|
{$IFNDEF MORPHOS}
|
||||||
|
|
||||||
{* Remove a socket from a set of sockets to be checked for available data *}
|
{* Remove a socket from a set of sockets to be checked for available data *}
|
||||||
function SDLNet_DelSocket( set_ : PSDLNet_SocketSet; sock : PSDLNet_GenericSocket ) : integer;
|
function SDLNet_DelSocket( set_ : PSDLNet_SocketSet; sock : PSDLNet_GenericSocket ) : integer;
|
||||||
@ -523,7 +536,10 @@ cdecl; external{$IFDEF __GPC__}name 'SDLNet_CheckSockets'{$ELSE}SDLNetLibName{$E
|
|||||||
socket that was in the socket set, to find out if data is available
|
socket that was in the socket set, to find out if data is available
|
||||||
for reading.
|
for reading.
|
||||||
*}
|
*}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
function SDLNet_SocketReady( sock : PSDLNet_GenericSocket ) : boolean;
|
function SDLNet_SocketReady( sock : PSDLNet_GenericSocket ) : boolean;
|
||||||
|
{$IFNDEF MORPHOS}
|
||||||
|
|
||||||
{* Free a set of sockets allocated by SDL_NetAllocSocketSet() *}
|
{* Free a set of sockets allocated by SDL_NetAllocSocketSet() *}
|
||||||
procedure SDLNet_FreeSocketSet( set_ : PSDLNet_SocketSet );
|
procedure SDLNet_FreeSocketSet( set_ : PSDLNet_SocketSet );
|
||||||
@ -556,6 +572,8 @@ cdecl; external{$IFDEF __GPC__}name 'SDLNet_Read32'{$ELSE}SDLNetLibName{$ENDIF _
|
|||||||
{* Error reporting functions *}
|
{* Error reporting functions *}
|
||||||
{***********************************************************************}
|
{***********************************************************************}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
{* We'll use SDL's functions for error reporting *}
|
{* We'll use SDL's functions for error reporting *}
|
||||||
procedure SDLNet_SetError( fmt : PChar );
|
procedure SDLNet_SetError( fmt : PChar );
|
||||||
function SDLNet_GetError : PChar;
|
function SDLNet_GetError : PChar;
|
||||||
|
@ -171,6 +171,9 @@ uses
|
|||||||
{$IFNDEF __GPC__}
|
{$IFNDEF __GPC__}
|
||||||
Windows,
|
Windows,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
exec,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
sdl;
|
sdl;
|
||||||
|
|
||||||
@ -195,6 +198,10 @@ const
|
|||||||
SDLttfLibName = 'SDL_ttf';
|
SDLttfLibName = 'SDL_ttf';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF MACOS}
|
||||||
|
SDLttfLibName = 'powersdl_ttf.library';
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *}
|
{* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *}
|
||||||
SDL_TTF_MAJOR_VERSION = 2;
|
SDL_TTF_MAJOR_VERSION = 2;
|
||||||
{$EXTERNALSYM SDL_TTF_MAJOR_VERSION}
|
{$EXTERNALSYM SDL_TTF_MAJOR_VERSION}
|
||||||
@ -232,6 +239,10 @@ type
|
|||||||
procedure SDL_TTF_VERSION( var X : TSDL_version );
|
procedure SDL_TTF_VERSION( var X : TSDL_version );
|
||||||
{$EXTERNALSYM SDL_TTF_VERSION}
|
{$EXTERNALSYM SDL_TTF_VERSION}
|
||||||
|
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
{$INCLUDE powersdl_ttf.inc}
|
||||||
|
{$ELSE MORPHOS}
|
||||||
|
|
||||||
{ This function gets the version of the dynamically linked SDL_ttf library.
|
{ This function gets the version of the dynamically linked SDL_ttf library.
|
||||||
It should NOT be used to fill a version structure, instead you should use the
|
It should NOT be used to fill a version structure, instead you should use the
|
||||||
SDL_TTF_VERSION() macro. }
|
SDL_TTF_VERSION() macro. }
|
||||||
@ -460,6 +471,8 @@ function TTF_WasInit : integer;
|
|||||||
cdecl; external {$IFDEF __GPC__}name 'TTF_WasInit'{$ELSE} SDLttfLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'TTF_WasInit'{$ELSE} SDLttfLibName{$ENDIF __GPC__};
|
||||||
{$EXTERNALSYM TTF_WasInit}
|
{$EXTERNALSYM TTF_WasInit}
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
// We'll use SDL for reporting errors
|
// We'll use SDL for reporting errors
|
||||||
procedure TTF_SetError( fmt : PChar );
|
procedure TTF_SetError( fmt : PChar );
|
||||||
|
|
||||||
|
@ -134,7 +134,9 @@ uses
|
|||||||
{$IFDEF __GPC__}
|
{$IFDEF __GPC__}
|
||||||
gpc,
|
gpc,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
exec,
|
||||||
|
{$ENDIF}
|
||||||
sdl;
|
sdl;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -154,6 +156,10 @@ const
|
|||||||
SmpegLibName = 'smpeg';
|
SmpegLibName = 'smpeg';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
SmpegLibName = 'smpeg.library';
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// MPEGFilter.h
|
// MPEGFilter.h
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -195,6 +201,8 @@ type
|
|||||||
destroy: TSMPEG_FilterDestroy;
|
destroy: TSMPEG_FilterDestroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFNDEF MORPHOS}
|
||||||
|
{* This part is a bit confusing in PowerSDL includes, fix later. KB *}
|
||||||
{ The null filter (default). It simply copies the source rectangle to the video overlay. }
|
{ The null filter (default). It simply copies the source rectangle to the video overlay. }
|
||||||
function SMPEGfilter_null: PSMPEG_Filter;
|
function SMPEGfilter_null: PSMPEG_Filter;
|
||||||
cdecl; external {$IFDEF __GPC__}name 'SMPEGfilter_null'{$ELSE} SmpegLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'SMPEGfilter_null'{$ELSE} SmpegLibName{$ENDIF __GPC__};
|
||||||
@ -206,6 +214,7 @@ cdecl; external {$IFDEF __GPC__}name 'SMPEGfilter_bilinear'{$ELSE} SmpegLibName{
|
|||||||
{ The deblocking filter. It filters block borders and non-intra coded blocks to reduce blockiness }
|
{ The deblocking filter. It filters block borders and non-intra coded blocks to reduce blockiness }
|
||||||
function SMPEGfilter_deblocking: PSMPEG_Filter;
|
function SMPEGfilter_deblocking: PSMPEG_Filter;
|
||||||
cdecl; external {$IFDEF __GPC__}name 'SMPEGfilter_deblocking'{$ELSE} SmpegLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'SMPEGfilter_deblocking'{$ELSE} SmpegLibName{$ENDIF __GPC__};
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// SMPEG.h
|
// SMPEG.h
|
||||||
@ -269,6 +278,9 @@ type
|
|||||||
TSMPEG_DisplayCallback = function( dst: PSDL_Surface; x, y: Integer; w, h: Cardinal ): Pointer;
|
TSMPEG_DisplayCallback = function( dst: PSDL_Surface; x, y: Integer; w, h: Cardinal ): Pointer;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF MORPHOS}
|
||||||
|
{$INCLUDE powersdl_smpeg.inc}
|
||||||
|
{$ELSE MORPHOS}
|
||||||
|
|
||||||
{ Create a new SMPEG object from an MPEG file.
|
{ Create a new SMPEG object from an MPEG file.
|
||||||
On return, if 'info' is not NULL, it will be filled with information
|
On return, if 'info' is not NULL, it will be filled with information
|
||||||
@ -334,8 +346,6 @@ cdecl; external {$IFDEF __GPC__}name 'SMPEG_scaleXY'{$ELSE} SmpegLibName{$ENDIF
|
|||||||
procedure SMPEG_scale(mpeg: PSMPEG; scale: Integer);
|
procedure SMPEG_scale(mpeg: PSMPEG; scale: Integer);
|
||||||
cdecl; external {$IFDEF __GPC__}name 'SMPEG_scale'{$ELSE} SmpegLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'SMPEG_scale'{$ELSE} SmpegLibName{$ENDIF __GPC__};
|
||||||
|
|
||||||
procedure SMPEG_Double(mpeg : PSMPEG; doubleit : Boolean );
|
|
||||||
|
|
||||||
{ Move the video display area within the destination surface }
|
{ Move the video display area within the destination surface }
|
||||||
procedure SMPEG_move(mpeg: PSMPEG; x, y: Integer);
|
procedure SMPEG_move(mpeg: PSMPEG; x, y: Integer);
|
||||||
cdecl; external {$IFDEF __GPC__}name 'SMPEG_move'{$ELSE} SmpegLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'SMPEG_move'{$ELSE} SmpegLibName{$ENDIF __GPC__};
|
||||||
@ -407,10 +417,14 @@ cdecl; external {$IFDEF __GPC__}name 'SMPEG_wantedSpec'{$ELSE} SmpegLibName{$END
|
|||||||
procedure SMPEG_actualSpec(mpeg: PSMPEG; spec: PSDL_AudioSpec);
|
procedure SMPEG_actualSpec(mpeg: PSMPEG; spec: PSDL_AudioSpec);
|
||||||
cdecl; external {$IFDEF __GPC__}name 'SMPEG_actualSpec'{$ELSE} SmpegLibName{$ENDIF __GPC__};
|
cdecl; external {$IFDEF __GPC__}name 'SMPEG_actualSpec'{$ELSE} SmpegLibName{$ENDIF __GPC__};
|
||||||
|
|
||||||
|
{$ENDIF MORPHOS}
|
||||||
|
|
||||||
{ This macro can be used to fill a version structure with the compile-time
|
{ This macro can be used to fill a version structure with the compile-time
|
||||||
version of the SDL library. }
|
version of the SDL library. }
|
||||||
procedure SMPEG_GETVERSION( var X : TSMPEG_version );
|
procedure SMPEG_GETVERSION( var X : TSMPEG_version );
|
||||||
|
|
||||||
|
procedure SMPEG_Double(mpeg : PSMPEG; doubleit : Boolean );
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$IFDEF __GPC__}
|
{$IFDEF __GPC__}
|
||||||
|
Loading…
Reference in New Issue
Block a user