diff options
author | karoly <karoly@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-10-23 01:54:47 +0000 |
---|---|---|
committer | karoly <karoly@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-10-23 01:54:47 +0000 |
commit | 32881b8f706809c1ed68e3f8689eb6091e93e6bc (patch) | |
tree | 6aa608053e31be2e100548d3771a91d3d08983cb /packages/sdl | |
parent | 910ba83d03c671cd788dccecfb7f1774c29133d6 (diff) | |
download | fpc-32881b8f706809c1ed68e3f8689eb6091e93e6bc.tar.gz |
+ some work to complete SDL package support for MorphOS. more to come.
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16200 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/sdl')
-rw-r--r-- | packages/sdl/src/powersdl.inc | 1 | ||||
-rw-r--r-- | packages/sdl/src/powersdl_image.inc | 35 | ||||
-rw-r--r-- | packages/sdl/src/sdl_image.pas | 12 |
3 files changed, 47 insertions, 1 deletions
diff --git a/packages/sdl/src/powersdl.inc b/packages/sdl/src/powersdl.inc index ae17e266d3..9b891e5f8f 100644 --- a/packages/sdl/src/powersdl.inc +++ b/packages/sdl/src/powersdl.inc @@ -109,6 +109,7 @@ function SDL_GetCursor : pSDL_Cursor; syscall basesysv PowerSDLBase 646; procedure SDL_FreeCursor(cursor : pSDL_Cursor); syscall basesysv PowerSDLBase 652; function SDL_ShowCursor(toggle : LongInt) : LongInt; syscall basesysv PowerSDLBase 658; function SDL_GetAppState : Byte; syscall basesysv PowerSDLBase 664; +procedure SDL_SetError(fmt: PChar); syscall basesysv PowerSDLBase 670; function SDL_GetError : pChar; syscall basesysv PowerSDLBase 676; procedure SDL_ClearError; syscall basesysv PowerSDLBase 682; function SDL_AudioInit(const driver_name : pChar) : LongInt; syscall basesysv PowerSDLBase 688; diff --git a/packages/sdl/src/powersdl_image.inc b/packages/sdl/src/powersdl_image.inc new file mode 100644 index 0000000000..35e937f0b1 --- /dev/null +++ b/packages/sdl/src/powersdl_image.inc @@ -0,0 +1,35 @@ + +var PowerSDLImageBase : pLibrary; + +const + POWERSDL_IMAGENAME : PChar = 'powersdl_image.library'; + +function IMG_LoadTyped_RW(src : pSDL_RWops; freesrc : LongInt; type_ : pChar) : pSDL_Surface; syscall r12base PowerSDLImageBase 028; +function IMG_Load(const file_ : pChar) : pSDL_Surface; syscall r12base PowerSDLImageBase 034; +function IMG_Load_RW(src : pSDL_RWops; freesrc : LongInt) : pSDL_Surface; syscall r12base PowerSDLImageBase 040; +function IMG_InvertAlpha(on : LongInt) : LongInt; syscall r12base PowerSDLImageBase 046; +function IMG_isBMP(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 052; +function IMG_isPNM(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 058; +function IMG_isXPM(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 064; +function IMG_isXCF(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 070; +function IMG_isPCX(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 076; +function IMG_isGIF(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 082; +function IMG_isJPG(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 088; +function IMG_isTIF(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 094; +function IMG_isPNG(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 100; +function IMG_isLBM(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 106; +function IMG_LoadBMP_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 112; +function IMG_LoadPNM_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 118; +function IMG_LoadXPM_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 124; +function IMG_LoadXCF_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 130; +function IMG_LoadPCX_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 136; +function IMG_LoadGIF_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 142; +function IMG_LoadJPG_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 148; +function IMG_LoadTIF_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 154; +function IMG_LoadPNG_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 160; +function IMG_LoadTGA_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 166; +function IMG_LoadLBM_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 172; +function IMG_ReadXPMFromArray(var xpm : pShortInt) : pSDL_Surface; syscall r12base PowerSDLImageBase 178; +function IMG_Linked_Version : pSDL_version; syscall r12base PowerSDLImageBase 184; +function IMG_isXV(src : pSDL_RWops) : LongInt; syscall r12base PowerSDLImageBase 190; +function IMG_LoadXV_RW(src : pSDL_RWops) : pSDL_Surface; syscall r12base PowerSDLImageBase 196; diff --git a/packages/sdl/src/sdl_image.pas b/packages/sdl/src/sdl_image.pas index 7f0c81af7d..cc1af557c7 100644 --- a/packages/sdl/src/sdl_image.pas +++ b/packages/sdl/src/sdl_image.pas @@ -137,6 +137,9 @@ uses {$IFDEF __GPC__} gpc, {$ENDIF} +{$IFDEF MORPHOS} + exec, +{$ENDIF} sdl; const @@ -160,6 +163,10 @@ const SDL_ImageLibName = 'SDL_image'; {$ENDIF} +{$IFDEF MORPHOS} + SDL_ImageLibName = 'powersdl_image.library'; +{$ENDIF} + // Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL SDL_IMAGE_MAJOR_VERSION = 1; {$EXTERNALSYM SDL_IMAGE_MAJOR_VERSION} @@ -168,6 +175,9 @@ const SDL_IMAGE_PATCHLEVEL = 5; {$EXTERNALSYM SDL_IMAGE_PATCHLEVEL} +{$IFDEF MORPHOS} +{$INCLUDE powersdl_image.inc} +{$ELSE MORPHOS} { This macro can be used to fill a version structure with the compile-time version of the SDL_image library. } procedure SDL_IMAGE_VERSION( var X : TSDL_Version ); @@ -305,7 +315,7 @@ function IMG_ReadXPMFromArray( xpm : PPChar ): PSDL_Surface; cdecl; external {$IFDEF __GPC__}name 'IMG_ReadXPMFromArray'{$ELSE} SDL_ImageLibName{$ENDIF __GPC__}; {$EXTERNALSYM IMG_ReadXPMFromArray} - +{$ENDIF MORPHOS} { used internally, NOT an exported function } |