38 {$IFDEF DARWIN} |
38 {$IFDEF DARWIN} |
39 {$PASCALMAINNAME SDL_main} |
39 {$PASCALMAINNAME SDL_main} |
40 {$IFNDEF IPHONEOS} |
40 {$IFNDEF IPHONEOS} |
41 {$linkframework Cocoa} |
41 {$linkframework Cocoa} |
42 {$linkframework SDL} |
42 {$linkframework SDL} |
43 {$linkframework SDL_mixer} |
|
44 {$linkframework SDL_net} |
43 {$linkframework SDL_net} |
45 {$linkframework SDL_image} |
44 {$linkframework SDL_image} |
46 {$linkframework SDL_ttf} |
45 {$linkframework SDL_ttf} |
47 {$linkframework Vorbis} |
|
48 {$linkframework Ogg} |
|
49 {$linklib SDLmain} |
46 {$linklib SDLmain} |
50 {$linklib gcc} |
47 {$linklib gcc} |
51 {$ENDIF} |
48 {$ENDIF} |
52 {$ENDIF} |
49 {$ENDIF} |
53 |
50 |
320 function TTF_RenderUTF8_Shaded(font: PTTF_Font; const text: PChar; fg, bg: Longword): PSDL_Surface; cdecl; external SDL_TTFLibName; |
317 function TTF_RenderUTF8_Shaded(font: PTTF_Font; const text: PChar; fg, bg: Longword): PSDL_Surface; cdecl; external SDL_TTFLibName; |
321 |
318 |
322 function TTF_OpenFont(const filename: PChar; size: LongInt): PTTF_Font; cdecl; external SDL_TTFLibName; |
319 function TTF_OpenFont(const filename: PChar; size: LongInt): PTTF_Font; cdecl; external SDL_TTFLibName; |
323 procedure TTF_SetFontStyle(font: PTTF_Font; style: LongInt); cdecl; external SDL_TTFLibName; |
320 procedure TTF_SetFontStyle(font: PTTF_Font; style: LongInt); cdecl; external SDL_TTFLibName; |
324 |
321 |
325 (* SDL_mixer *) |
|
326 |
|
327 const {$IFDEF WIN32} |
|
328 SDL_MixerLibName = 'SDL_mixer.dll'; |
|
329 {$ENDIF} |
|
330 {$IFDEF UNIX} |
|
331 {$IFDEF DARWIN} |
|
332 SDL_MixerLibName = 'SDL_mixer'; |
|
333 {$ELSE} |
|
334 SDL_MixerLibName = 'libSDL_mixer.so'; |
|
335 {$ENDIF} |
|
336 {$ENDIF} |
|
337 |
|
338 const MIX_MAX_VOLUME = 128; |
|
339 |
|
340 type PMixChunk = ^TMixChunk; |
|
341 TMixChunk = record |
|
342 allocated: Longword; |
|
343 abuf : PByte; |
|
344 alen : Longword; |
|
345 volume : PByte; |
|
346 end; |
|
347 TMusic = (MUS_CMD, MUS_WAV, MUS_MOD, MUS_MID, MUS_OGG, MUS_MP3); |
|
348 TMix_Fading = (MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN); |
|
349 |
|
350 TMidiSong = record |
|
351 samples : LongInt; |
|
352 events : pointer; |
|
353 end; |
|
354 |
|
355 TMusicUnion = record |
|
356 case Byte of |
|
357 0: ( midi : TMidiSong ); |
|
358 1: ( ogg : pointer); |
|
359 end; |
|
360 |
|
361 PMixMusic = ^TMixMusic; |
|
362 TMixMusic = record |
|
363 end; |
|
364 |
|
365 function Mix_OpenAudio(frequency: LongInt; format: Word; channels: LongInt; chunksize: LongInt): LongInt; cdecl; external SDL_MixerLibName; |
|
366 procedure Mix_CloseAudio; cdecl; external SDL_MixerLibName; |
|
367 |
|
368 function Mix_Volume(channel: LongInt; volume: LongInt): LongInt; cdecl; external SDL_MixerLibName; |
|
369 function Mix_SetDistance(channel: LongInt; distance: Byte): LongInt; cdecl; external SDL_MixerLibName; |
|
370 function Mix_VolumeMusic(volume: LongInt): LongInt; cdecl; external SDL_MixerLibName; |
|
371 |
|
372 function Mix_AllocateChannels(numchans: LongInt): LongInt; cdecl; external SDL_MixerLibName; |
|
373 procedure Mix_FreeChunk(chunk: PMixChunk); cdecl; external SDL_MixerLibName; |
|
374 procedure Mix_FreeMusic(music: PMixMusic); cdecl; external SDL_MixerLibName; |
|
375 |
|
376 function Mix_LoadWAV_RW(src: PSDL_RWops; freesrc: LongInt): PMixChunk; cdecl; external SDL_MixerLibName; |
|
377 function Mix_LoadMUS(const filename: PChar): PMixMusic; cdecl; external SDL_MixerLibName; |
|
378 |
|
379 function Mix_Playing(channel: LongInt): LongInt; cdecl; external SDL_MixerLibName; |
|
380 function Mix_PlayingMusic: LongInt; cdecl; external SDL_MixerLibName; |
|
381 function Mix_FadeInMusic(music: PMixMusic; loops: LongInt; ms: LongInt): LongInt; cdecl; external SDL_MixerLibName; |
|
382 |
|
383 function Mix_PlayChannelTimed(channel: LongInt; chunk: PMixChunk; loops: LongInt; ticks: LongInt): LongInt; cdecl; external SDL_MixerLibName; |
|
384 function Mix_PlayMusic(music: PMixMusic; loops: LongInt): LongInt; cdecl; external SDL_MixerLibName; |
|
385 function Mix_PausedMusic(music: PMixMusic): LongInt; cdecl; external SDL_MixerLibName; |
|
386 function Mix_PauseMusic(music: PMixMusic): LongInt; cdecl; external SDL_MixerLibName; |
|
387 function Mix_ResumeMusic(music: PMixMusic): LongInt; cdecl; external SDL_MixerLibName; |
|
388 function Mix_HaltChannel(channel: LongInt): LongInt; cdecl; external SDL_MixerLibName; |
|
389 |
322 |
390 (* SDL_image *) |
323 (* SDL_image *) |
391 |
324 |
392 const {$IFDEF WIN32} |
325 const {$IFDEF WIN32} |
393 SDL_ImageLibName = 'SDL_image.dll'; |
326 SDL_ImageLibName = 'SDL_image.dll'; |