hedgewars/SDLh.pas
changeset 2664 949c189ba568
parent 2663 d53918cd22bb
child 2665 50b4e544c163
equal deleted inserted replaced
2663:d53918cd22bb 2664:949c189ba568
   260 			1: (	value: Longword);
   260 			1: (	value: Longword);
   261 		end;
   261 		end;
   262 
   262 
   263 
   263 
   264 	PSDL_RWops = ^TSDL_RWops;
   264 	PSDL_RWops = ^TSDL_RWops;
   265 {$IFDEF FPC}
       
   266 	TSeek  = function( context: PSDL_RWops; offset: LongInt; whence: LongInt ): LongInt; cdecl;
   265 	TSeek  = function( context: PSDL_RWops; offset: LongInt; whence: LongInt ): LongInt; cdecl;
   267 	TRead  = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; maxnum : LongInt ): LongInt;  cdecl;
   266 	TRead  = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; maxnum : LongInt ): LongInt;  cdecl;
   268 	TWrite = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; num: LongInt ): LongInt; cdecl;
   267 	TWrite = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; num: LongInt ): LongInt; cdecl;
   269 	TClose = function( context: PSDL_RWops ): LongInt; cdecl;
   268 	TClose = function( context: PSDL_RWops ): LongInt; cdecl;
   270 {$ELSE}
       
   271 	TSeek  = function( context: PSDL_RWops; offset: LongInt; whence: LongInt ): LongInt;
       
   272 	TRead  = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; maxnum : LongInt ): LongInt;
       
   273 	TWrite = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; num: LongInt ): LongInt;
       
   274 	TClose = function( context: PSDL_RWops ): LongInt;
       
   275 
       
   276 	PByte = ^Byte;
       
   277 {$ENDIF}
       
   278 
   269 
   279 	TStdio = record
   270 	TStdio = record
   280 		autoclose: LongInt;
   271 		autoclose: LongInt;
   281 		fp: pointer;
   272 		fp: pointer;
   282 		end;
   273 		end;
   667 function  TTF_Init: LongInt; cdecl; external SDL_TTFLibName;
   658 function  TTF_Init: LongInt; cdecl; external SDL_TTFLibName;
   668 procedure TTF_Quit; cdecl; external SDL_TTFLibName;
   659 procedure TTF_Quit; cdecl; external SDL_TTFLibName;
   669 function  TTF_SizeUTF8(font: PTTF_Font; const text: PChar; var w, h: LongInt): LongInt; cdecl; external SDL_TTFLibName;
   660 function  TTF_SizeUTF8(font: PTTF_Font; const text: PChar; var w, h: LongInt): LongInt; cdecl; external SDL_TTFLibName;
   670 (* TSDL_Color -> Longword conversion is workaround over freepascal bug.
   661 (* TSDL_Color -> Longword conversion is workaround over freepascal bug.
   671    See http://www.freepascal.org/mantis/view.php?id=7613 for details *)
   662    See http://www.freepascal.org/mantis/view.php?id=7613 for details *)
   672 function  TTF_RenderUTF8_Solid(font: PTTF_Font; const text: PChar; fg: Longword): PSDL_Surface; cdecl; external SDL_TTFLibName;
   663 function  TTF_RenderUTF8_Solid(font: PTTF_Font; const text: PChar; fg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName;
   673 function  TTF_RenderUTF8_Blended(font: PTTF_Font; const text: PChar; fg: Longword): PSDL_Surface; cdecl; external SDL_TTFLibName;
   664 function  TTF_RenderUTF8_Blended(font: PTTF_Font; const text: PChar; fg: Longword): PSDL_Surface; cdecl; external SDL_TTFLibName;
   674 function  TTF_RenderUTF8_Shaded(font: PTTF_Font; const text: PChar; fg, bg: Longword): PSDL_Surface; cdecl; external SDL_TTFLibName;
   665 function  TTF_RenderUTF8_Shaded(font: PTTF_Font; const text: PChar; fg, bg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName;
   675 
   666 
   676 function  TTF_OpenFont(const filename: PChar; size: LongInt): PTTF_Font; cdecl; external SDL_TTFLibName;
   667 function  TTF_OpenFont(const filename: PChar; size: LongInt): PTTF_Font; cdecl; external SDL_TTFLibName;
   677 procedure TTF_SetFontStyle(font: PTTF_Font; style: LongInt); cdecl; external SDL_TTFLibName;
   668 procedure TTF_SetFontStyle(font: PTTF_Font; style: LongInt); cdecl; external SDL_TTFLibName;
   678 
   669 
   679 (*  SDL_mixer  *)
   670 (*  SDL_mixer  *)