hedgewars/SDLh.pas
changeset 206 32fa6282efe2
parent 202 8603c0420461
child 308 806c3b55500d
equal deleted inserted replaced
205:8d9aff55e6ab 206:32fa6282efe2
   105                     offset: integer;
   105                     offset: integer;
   106                     end;
   106                     end;
   107 
   107 
   108      PSDL_Color = ^TSDL_Color;
   108      PSDL_Color = ^TSDL_Color;
   109      TSDL_Color = record
   109      TSDL_Color = record
   110                   r: Byte;
   110                   case byte of
   111                   g: Byte;
   111                        0: (r: Byte;
   112                   b: Byte;
   112                            g: Byte;
   113                   unused: Byte;
   113                            b: Byte;
       
   114                            unused: Byte;
       
   115                           );
       
   116 (* workaround over freepascal bug.
       
   117    See http://www.freepascal.org/mantis/view.php?id=7613 for details *)
       
   118                        1: (value: Longword);
   114                   end;
   119                   end;
   115 
   120 
   116      PSDL_RWops = ^TSDL_RWops;
   121      PSDL_RWops = ^TSDL_RWops;
   117      TSeek = function( context: PSDL_RWops; offset: LongInt; whence: LongInt ): LongInt; cdecl;
   122      TSeek = function( context: PSDL_RWops; offset: LongInt; whence: LongInt ): LongInt; cdecl;
   118      TRead = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; maxnum : LongInt ): LongInt;  cdecl;
   123      TRead = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; maxnum : LongInt ): LongInt;  cdecl;
   237 function TTF_Init: integer; cdecl; external SDL_TTFLibName;
   242 function TTF_Init: integer; cdecl; external SDL_TTFLibName;
   238 procedure TTF_Quit; cdecl; external SDL_TTFLibName;
   243 procedure TTF_Quit; cdecl; external SDL_TTFLibName;
   239 
   244 
   240 
   245 
   241 function TTF_SizeUTF8(font: PTTF_Font; const text: PChar; var w, h: integer): integer; cdecl; external SDL_TTFLibName;
   246 function TTF_SizeUTF8(font: PTTF_Font; const text: PChar; var w, h: integer): integer; cdecl; external SDL_TTFLibName;
   242 function TTF_RenderUTF8_Solid(font: PTTF_Font; const text: PChar; fg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName;
   247 (* TSDL_Color -> Longword conversion is workaround over freepascal bug.
   243 function TTF_RenderUTF8_Blended(font: PTTF_Font; const text: PChar; fg: TSDL_Color): PSDL_Surface; cdecl; external SDL_TTFLibName;
   248    See http://www.freepascal.org/mantis/view.php?id=7613 for details *)
       
   249 function TTF_RenderUTF8_Solid(font: PTTF_Font; const text: PChar; fg: Longword): PSDL_Surface; cdecl; external SDL_TTFLibName;
       
   250 function TTF_RenderUTF8_Blended(font: PTTF_Font; const text: PChar; fg: Longword): PSDL_Surface; cdecl; external SDL_TTFLibName;
       
   251 
   244 function TTF_OpenFont(const filename: PChar; size: integer): PTTF_Font; cdecl; external SDL_TTFLibName;
   252 function TTF_OpenFont(const filename: PChar; size: integer): PTTF_Font; cdecl; external SDL_TTFLibName;
   245 procedure TTF_SetFontStyle(font: PTTF_Font; style: integer); cdecl; external SDL_TTFLibName;
   253 procedure TTF_SetFontStyle(font: PTTF_Font; style: integer); cdecl; external SDL_TTFLibName;
   246 
   254 
   247 (*  SDL_mixer *)
   255 (*  SDL_mixer *)
   248 
   256