hedgewars/SDLh.pas
changeset 106 98cb6606bf67
parent 105 e7cb9bb4a9de
child 107 b08ce0293a51
equal deleted inserted replaced
105:e7cb9bb4a9de 106:98cb6606bf67
   112 
   112 
   113      PSDL_Surface = ^TSDL_Surface;
   113      PSDL_Surface = ^TSDL_Surface;
   114      TSDL_Surface = record
   114      TSDL_Surface = record
   115                     flags : Longword;
   115                     flags : Longword;
   116                     format: PSDL_PixelFormat;
   116                     format: PSDL_PixelFormat;
   117                     w, h  : LongInt;
   117                     w, h  : integer;
   118                     pitch : Word;
   118                     pitch : Word;
   119                     pixels: Pointer;
   119                     pixels: Pointer;
   120                     offset: LongInt;
   120                     offset: LongInt;
   121                     hwdata: Pointer;
       
   122                     clip_rect: TSDL_Rect;
       
   123                     unused1,
       
   124                     locked   : Longword;
       
   125                     Blitmap  : Pointer;
       
   126                     format_version: Longword;
       
   127                     refcount : LongInt;
       
   128                     end;
   121                     end;
   129 
   122 
   130      PSDL_Color = ^TSDL_Color;
   123      PSDL_Color = ^TSDL_Color;
   131      TSDL_Color = record
   124      TSDL_Color = record
   132                   r: Byte;
   125                   r: Byte;
   168                        2: (unknown: TUnknown);
   161                        2: (unknown: TUnknown);
   169                        end;
   162                        end;
   170 
   163 
   171      TSDL_KeySym = record
   164      TSDL_KeySym = record
   172                    scancode: Byte;
   165                    scancode: Byte;
   173                    sym,
   166                    sym: Longword;
   174                    modifier: Longword;
   167                    modifier: Longword;
   175                    unicode: Word;
   168                    unicode: Word;
   176                    end;
   169                    end;
   177 
   170 
   178      TSDL_KeyboardEvent = record
   171      TSDL_KeyboardEvent = record
   285      TMixChunk = record
   278      TMixChunk = record
   286                  allocated: Longword;
   279                  allocated: Longword;
   287                  abuf     : PByte;
   280                  abuf     : PByte;
   288                  alen     : Longword;
   281                  alen     : Longword;
   289                  volume   : PByte;
   282                  volume   : PByte;
   290                   end;
   283                  end;
   291      TMusic = (MUS_CMD, MUS_WAV, MUS_MOD, MUS_MID, MUS_OGG, MUS_MP3);
   284      TMusic = (MUS_CMD, MUS_WAV, MUS_MOD, MUS_MID, MUS_OGG, MUS_MP3);
   292      TMix_Fading = (MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN);
   285      TMix_Fading = (MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN);
   293 
   286 
   294      TMidiSong = record
   287      TMidiSong = record
   295                samples : LongInt;
   288                samples : LongInt;
   302              1: ( ogg  : pointer);
   295              1: ( ogg  : pointer);
   303              end;
   296              end;
   304 
   297 
   305      PMixMusic = ^TMixMusic;
   298      PMixMusic = ^TMixMusic;
   306      TMixMusic = record
   299      TMixMusic = record
   307                  type_  : TMusic;
       
   308                  data   : TMusicUnion;
       
   309                  fading : TMix_Fading;
       
   310                  fade_volume,
       
   311                  fade_step,
       
   312                  fade_steps,
       
   313                  error  : LongInt;
       
   314                  end;
   300                  end;
   315 
   301 
   316 function  Mix_OpenAudio(frequency: LongInt; format: Word; channels: LongInt; chunksize: LongInt): LongInt; cdecl; external SDL_MixerLibName;
   302 function  Mix_OpenAudio(frequency: LongInt; format: Word; channels: LongInt; chunksize: LongInt): LongInt; cdecl; external SDL_MixerLibName;
   317 procedure Mix_CloseAudio; cdecl; external SDL_MixerLibName;
   303 procedure Mix_CloseAudio; cdecl; external SDL_MixerLibName;
   318 
   304 
   357                   port: Word;
   343                   port: Word;
   358                   end;
   344                   end;
   359 
   345 
   360      PTCPSocket = ^TTCPSocket;
   346      PTCPSocket = ^TTCPSocket;
   361      TTCPSocket = record
   347      TTCPSocket = record
   362                   ready,
   348                   ready: LongInt;
   363                   channel: LongInt;
   349                   channel: LongInt;
   364                   remoteAddress,
   350                   remoteAddress: TIPaddress;
   365                   localAddress: TIPaddress;
   351                   localAddress: TIPaddress;
   366                   sflag: LongInt;
   352                   sflag: LongInt;
   367                   end;
   353                   end;
   368      PSDLNet_SocketSet = ^TSDLNet_SocketSet;
   354      PSDLNet_SocketSet = ^TSDLNet_SocketSet;
   369      TSDLNet_SocketSet = record
   355      TSDLNet_SocketSet = record