CSFML 2.1 pour pure basic, tous ensemble!

Vous avez développé un logiciel en PureBasic et vous souhaitez le faire connaitre ?
poshu
Messages : 1138
Inscription : sam. 31/juil./2004 22:32

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par poshu »

Vi, je sais utiliser svn (mais j'ai jamais utilisé google code, c'est un repo subversion comme les autres? mon client habituel ne posera pas de problème, ou il faut un truc spécifique?).

Je t'envoie mon mail en mp.
G-Rom
Messages : 3641
Inscription : dim. 10/janv./2010 5:29

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par G-Rom »

je t'ai rajouté : https://code.google.com/p/purebasic-sfml-2-1/
Ne fait pas attention encore a l'outils de compilation (cmake) , pour le dev , tu peu lié la SFML en dynamique ( en utilisant mes sources modifié à l'intérieur )
Je tiens aussi à utilisé une syntaxe commune , regarde comment est foutu la partie audio ou système.
tu peu comité dès lors que tu as fait un changement ( en le notant dans le log de façon à se repéré sur le svn )
Je vais revoir la partie des sf::Vector, pour l'instant , c'est une structure définie dans Config.hpp , un sf::Vector deviens un sfVector , je vais surement viré la structure et utilisé directement l'objet comme je l'ai fait avec tout le reste.
G-Rom
Messages : 3641
Inscription : dim. 10/janv./2010 5:29

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par G-Rom »

j'ai oublié, compile de ton coté dans un dossier build que tu ne met pas à jour sur le svn , du coup , j'ai oublié de commité le fichier d'importation des fct° , c'est une ébauche, mais il fonctionne sous windows pour le moment :

Code : Tout sélectionner

Global PBSFML_LIBRARY = OpenLibrary(#PB_Any,"libPBSFML.dll")


;============================================================================== 
;- SFML SYSTEM
;==============================================================================

Structure sfInputStream
  *read     ; Function To Read Data from the stream                     func(*data,*size,*userData)
  *seek     ; Function To set the current Read position                 func(*position, *userData)
  *tell     ; Function To get the current Read position                 func(*userData)
  *getSize  ; Function To get the total number of bytes in the stream   func(*userData)
  *userdata ; User Data that will be passed To the callbacks
EndStructure


Structure sfVector2i
  x.l
  y.l
EndStructure

Structure sfVector2u
  x.i
  y.i
EndStructure

Structure sfVector2f
  x.f
  y.f
EndStructure

Structure sfVector3f
  x.f
  y.f
  z.f
EndStructure

;
;-sfTime
;
PrototypeC   sfTime_create()
PrototypeC   sfTime_destroy(*sfTime)
PrototypeC.f sfTime_asSeconds(*sfTime)
PrototypeC.i sfTime_asMilliseconds(*sfTime)
PrototypeC.i sfTime_asMicroseconds(*sfTime)
PrototypeC.i sfSeconds(amount.f)
PrototypeC.i sfMilliseconds(amount.i)
PrototypeC.i sfMicroseconds(amount.i)
PrototypeC   sfSleep(*sfTime)

Global sfTime_create.sfTime_create                  = GetFunction(PBSFML_LIBRARY,"sfTime_create")
Global sfTime_destroy.sfTime_destroy                = GetFunction(PBSFML_LIBRARY,"sfTime_destroy")
Global sfTime_asSeconds.sfTime_asSeconds            = GetFunction(PBSFML_LIBRARY,"sfTime_asSeconds")
Global sfTime_asMilliseconds.sfTime_asMilliseconds  = GetFunction(PBSFML_LIBRARY,"sfTime_asMilliseconds")
Global sfTime_asMicroseconds.sfTime_asMicroseconds  = GetFunction(PBSFML_LIBRARY,"sfTime_asMicroseconds")
Global sfSeconds.sfSeconds                          = GetFunction(PBSFML_LIBRARY,"sfSeconds")
Global sfMilliseconds.sfMilliseconds                = GetFunction(PBSFML_LIBRARY,"sfMilliseconds")
Global sfMicroseconds.sfMicroseconds                = GetFunction(PBSFML_LIBRARY,"sfMicroseconds")
Global sfSleep.sfSleep                              = GetFunction(PBSFML_LIBRARY,"sfSleep")

;
;-sfClock
;
PrototypeC.i sfClock_create()
PrototypeC.i sfClock_copy(*sfClock)
PrototypeC   sfClock_destroy(*sfClock)
PrototypeC.i sfClock_getElapsedTime(*sfClock)
PrototypeC.i sfClock_restart(*sfClock)


Global sfClock_create.sfClock_create                  = GetFunction(PBSFML_LIBRARY,"sfClock_create")
Global sfClock_copy.sfClock_copy                      = GetFunction(PBSFML_LIBRARY,"sfClock_copy")
Global sfClock_destroy.sfClock_destroy                = GetFunction(PBSFML_LIBRARY,"sfClock_destroy")
Global sfClock_getElapsedTime.sfClock_getElapsedTime  = GetFunction(PBSFML_LIBRARY,"sfClock_getElapsedTime")
Global sfClock_restart.sfClock_restart                = GetFunction(PBSFML_LIBRARY,"sfClock_restart")

;
;-sfMutex
;
PrototypeC.i sfMutex_create()
PrototypeC   sfMutex_destroy(*sfMutex)
PrototypeC   sfMutex_lock(*sfMutex)
PrototypeC   sfMutex_unlock(*sfMutex)

Global sfMutex_create.sfMutex_create    = GetFunction(PBSFML_LIBRARY,"sfMutex_create")
Global sfMutex_destroy.sfMutex_destroy  = GetFunction(PBSFML_LIBRARY,"sfMutex_destroy")
Global sfMutex_lock.sfMutex_lock        = GetFunction(PBSFML_LIBRARY,"sfMutex_lock")
Global sfMutex_unlock.sfMutex_unlock    = GetFunction(PBSFML_LIBRARY,"sfMutex_unlock")


;
;-sfThread
;
PrototypeC.i sfThread_create(*function,*data)
PrototypeC   sfThread_destroy(*sfThread)
PrototypeC   sfThread_launch(*sfThread)
PrototypeC   sfThread_wait(*sfThread)
PrototypeC   sfThread_terminate(*sfThread)

Global sfThread_create.sfThread_create        = GetFunction(PBSFML_LIBRARY,"sfThread_create")
Global sfThread_destroy.sfThread_destroy      = GetFunction(PBSFML_LIBRARY,"sfThread_destroy")
Global sfThread_launch.sfThread_launch        = GetFunction(PBSFML_LIBRARY,"sfThread_launch")
Global sfThread_wait.sfThread_wait            = GetFunction(PBSFML_LIBRARY,"sfThread_wait")
Global sfThread_terminate.sfThread_terminate  = GetFunction(PBSFML_LIBRARY,"sfThread_terminate")




;-


;============================================================================== 
;- SFML WINDOWS
;==============================================================================

;
;-keyboard constants
;
Enumeration
  #sfKeyUnknown = -1
  #sfKeyA
  #sfKeyB
  #sfKeyC
  #sfKeyD
  #sfKeyE
  #sfKeyF
  #sfKeyG
  #sfKeyH
  #sfKeyI
  #sfKeyJ
  #sfKeyK
  #sfKeyL
  #sfKeyM
  #sfKeyN
  #sfKeyO
  #sfKeyP
  #sfKeyQ
  #sfKeyR
  #sfKeyS
  #sfKeyT
  #sfKeyU
  #sfKeyV
  #sfKeyW
  #sfKeyX
  #sfKeyY
  #sfKeyZ
  #sfKeyNum0
  #sfKeyNum1
  #sfKeyNum2
  #sfKeyNum3
  #sfKeyNum4
  #sfKeyNum5
  #sfKeyNum6
  #sfKeyNum7
  #sfKeyNum8
  #sfKeyNum9
  #sfKeyEscape
  #sfKeyLControl
  #sfKeyLShift
  #sfKeyLAlt
  #sfKeyLSystem
  #sfKeyRControl
  #sfKeyRShift
  #sfKeyRAlt
  #sfKeyRSystem
  #sfKeyMenu
  #sfKeyLBracket
  #sfKeyRBracket
  #sfKeySemiColon
  #sfKeyComma
  #sfKeyPeriod
  #sfKeyQuote
  #sfKeySlash
  #sfKeyBackSlash
  #sfKeyTilde
  #sfKeyEqual
  #sfKeyDash
  #sfKeySpace
  #sfKeyReturn
  #sfKeyBack
  #sfKeyTab
  #sfKeyPageUp
  #sfKeyPageDown
  #sfKeyEnd
  #sfKeyHome
  #sfKeyInsert
  #sfKeyDelete
  #sfKeyAdd
  #sfKeySubtract
  #sfKeyMultiply
  #sfKeyDivide
  #sfKeyLeft
  #sfKeyRight
  #sfKeyUp
  #sfKeyDown
  #sfKeyNumpad0
  #sfKeyNumpad1
  #sfKeyNumpad2
  #sfKeyNumpad3
  #sfKeyNumpad4
  #sfKeyNumpad5
  #sfKeyNumpad6
  #sfKeyNumpad7
  #sfKeyNumpad8
  #sfKeyNumpad9
  #sfKeyF1
  #sfKeyF2
  #sfKeyF3
  #sfKeyF4
  #sfKeyF5
  #sfKeyF6
  #sfKeyF7
  #sfKeyF8
  #sfKeyF9
  #sfKeyF10
  #sfKeyF11
  #sfKeyF12
  #sfKeyF13
  #sfKeyF14
  #sfKeyF15
  #sfKeyPause
  #sfKeyCount
EndEnumeration

PrototypeC sfKeyboard_isKeyPressed(key.l)

Global sfKeyboard_isKeyPressed.sfKeyboard_isKeyPressed          = GetFunction(PBSFML_LIBRARY,"sfKeyboard_isKeyPressed")


;
;-event constants
;
Enumeration
  #sfEvtClosed
  #sfEvtResized
  #sfEvtLostFocus
  #sfEvtGainedFocus
  #sfEvtTextEntered
  #sfEvtKeyPressed
  #sfEvtKeyReleased
  #sfEvtMouseWheelMoved
  #sfEvtMouseButtonPressed
  #sfEvtMouseButtonReleased
  #sfEvtMouseMoved
  #sfEvtMouseEntered
  #sfEvtMouseLeft
  #sfEvtJoystickButtonPressed
  #sfEvtJoystickButtonReleased
  #sfEvtJoystickMoved
  #sfEvtJoystickConnected
  #sfEvtJoystickDisconnected
EndEnumeration

Structure sfKeyEvent
  type.l
  code.l
  alt.b
  control.b
  shift.b
  system.l
EndStructure

Structure sfTextEvent
  type.l
  unicode.l
EndStructure

Structure sfMouseMoveEvent
  type.l
  x.i
  y.i
EndStructure

Structure sfMouseButtonEvent
  type.l
  button.l
  x.i
  y.i
EndStructure

Structure sfMouseWheelEvent
  type.l
  delta.l
  x.i
  y.i
EndStructure

Structure sfJoystickMoveEvent
  type.l
  joystickId.i
  axis.l
  position.f
EndStructure

Structure sfJoystickButtonEvent
  type.l
  joystickId.i
  button.i
EndStructure

Structure sfJoystickConnectEvent
  type.l
  joystickId.i
EndStructure

Structure sfSizeEvent
  type.l
  width.i
  height.i
EndStructure

Structure sfEvent
  StructureUnion
    type.l
    size.sfSizeEvent
    key.sfKeyEvent
    text.sfTextEvent
    mouseMove.sfMouseMoveEvent
    mouseButton.sfMouseButtonEvent
    mouseWhell.sfMouseWheelEvent
    joystickMove.sfJoystickMoveEvent
    joystickButton.sfJoystickButtonEvent
    joystickConnect.sfJoystickConnectEvent
  EndStructureUnion
EndStructure

;
;-mouse
;
Enumeration
  #sfMouseLeft        ;The left mouse button
  #sfMouseRight       ;The right mouse button
  #sfMouseMiddle      ;The middle (wheel) mouse button
  #sfMouseXButton1    ;The first extra mouse button
  #sfMouseXButton2    ;The second extra mouse button
  #sfMouseButtonCount ;Keep last -- the total number of mouse buttons
EndEnumeration

PrototypeC.b   sfMouse_isButtonPressed(button.l)
PrototypeC.i   sfMouse_getPosition(*sfWindow)
PrototypeC     sfMouse_setPosition(*sfVector2i, *sfWindow)

Global sfMouse_isButtonPressed.sfMouse_isButtonPressed  = GetFunction(PBSFML_LIBRARY,"sfMouse_isButtonPressed")
Global sfMouse_getPosition.sfMouse_getPosition          = GetFunction(PBSFML_LIBRARY,"sfMouse_getPosition")
Global sfMouse_setPosition.sfMouse_setPosition          = GetFunction(PBSFML_LIBRARY,"sfMouse_setPosition")

;
;-joystick
;
Enumeration
  #sfJoystickCount       = 8  ;Maximum number of supported joysticks
  #sfJoystickButtonCount = 32 ;Maximum number of supported buttons
  #sfJoystickAxisCount   = 8  ;Maximum number of supported axes
EndEnumeration


Enumeration
  #sfJoystickX     ;The X axis
  #sfJoystickY     ;The Y axis
  #sfJoystickZ     ;The Z axis
  #sfJoystickR     ;The R axis
  #sfJoystickU     ;The U axis
  #sfJoystickV     ;The V axis
  #sfJoystickPovX  ;The X axis of the point-of-view hat
  #sfJoystickPovY  ;The Y axis of the point-of-view hat
EndEnumeration

PrototypeC.b   sfJoystick_isConnected(joystick.l)
PrototypeC.l   sfJoystick_getButtonCount(joystick.l)
PrototypeC.b   sfJoystick_hasAxis(joystick.l, axis.l)
PrototypeC.b   sfJoystick_isButtonPressed(joystick.l, button.l)
PrototypeC.f   sfJoystick_getAxisPosition(joystick.l, axis.l)
PrototypeC     sfJoystick_update()

Global sfJoystick_isConnected.sfJoystick_isConnected          = GetFunction(PBSFML_LIBRARY,"sfJoystick_isConnected")
Global sfJoystick_getButtonCount.sfJoystick_getButtonCount    = GetFunction(PBSFML_LIBRARY,"sfJoystick_getButtonCount")
Global sfJoystick_hasAxis.sfJoystick_hasAxis                  = GetFunction(PBSFML_LIBRARY,"sfJoystick_hasAxis")
Global sfJoystick_isButtonPressed.sfJoystick_isButtonPressed  = GetFunction(PBSFML_LIBRARY,"sfJoystick_isButtonPressed")
Global sfJoystick_getAxisPosition.sfJoystick_getAxisPosition  = GetFunction(PBSFML_LIBRARY,"sfJoystick_getAxisPosition")
Global sfJoystick_update.sfJoystick_update                    = GetFunction(PBSFML_LIBRARY,"sfJoystick_update")

;
;-VideoMode
;
Structure sfVideoMode
 width.l        ; Video mode width, in pixels
 height.l       ; Video mode height, in pixels
 bitsPerPixel.l ; Video mode pixel depth, in bits per pixels
EndStructure

PrototypeC.i   sfVideoMode_getDesktopMode()
PrototypeC.i   sfVideoMode_countFullscreenModes()
PrototypeC     sfVideoMode_getFullscreenModes(*array.sfVideoMode)
PrototypeC.b   sfVideoMode_isValid(*sfVideoMode)

Global sfVideoMode_getDesktopMode.sfVideoMode_getDesktopMode              = GetFunction(PBSFML_LIBRARY,"sfVideoMode_getDesktopMode")
Global sfVideoMode_countFullscreenModes.sfVideoMode_countFullscreenModes  = GetFunction(PBSFML_LIBRARY,"sfVideoMode_countFullscreenModes")
Global sfVideoMode_getFullscreenModes.sfVideoMode_getFullscreenModes      = GetFunction(PBSFML_LIBRARY,"sfVideoMode_getFullscreenModes")
Global sfVideoMode_isValid.sfVideoMode_isValid                            = GetFunction(PBSFML_LIBRARY,"sfVideoMode_isValid")

;
;-Window
;

Enumeration
    #sfNone         = 0                                   ;No border / title bar (this flag And all others are mutually exclusive)
    #sfTitlebar     = 1 << 0                              ;Title bar + fixed border
    #sfResize       = 1 << 1                              ;Titlebar + resizable border + maximize button
    #sfClose        = 1 << 2                              ;Titlebar + close button
    #sfFullscreen   = 1 << 3                              ;Fullscreen mode (this flag And all others are mutually exclusive)
    #sfDefaultStyle = #sfTitlebar | #sfResize | #sfClose  ;Default window style
EndEnumeration


Structure sfContextSettings
  depthBits.l         ;Bits of the depth buffer
  stencilBits.l       ;Bits of the stencil buffer
  antialiasingLevel.l ;Level of antialiasing
  majorVersion.l      ;Major number of the context version To create
  minorVersion.l      ;Minor number of the context version To create
EndStructure 


PrototypeC.i sfWindow_create3(*sfVideoMode , title.s, style.l, *settings.sfContextSettings)
PrototypeC.i sfWindow_create2(*sfVideoMode , title.s, style.l)
PrototypeC.i sfWindow_create(*sfVideoMode , title.s)
PrototypeC.i sfWindow_createUnicode3(*sfVideoMode ,  title.s, style.l, *settings.sfContextSettings)
PrototypeC.i sfWindow_createUnicode2(*sfVideoMode ,  title.s, style.l)
PrototypeC.i sfWindow_createUnicode(*sfVideoMode ,  title.s)
PrototypeC.i sfWindow_createFromHandle2(handle.i, *settings.sfContextSettings)
PrototypeC.i sfWindow_createFromHandle(handle.i)
PrototypeC   sfWindow_destroy(*sfWindow)
PrototypeC   sfWindow_close(*sfWindow)
PrototypeC.b sfWindow_isOpen(*sfWindow)
PrototypeC   sfWindow_getSettings(*sfWindow , *settings.sfContextSettings)
PrototypeC.b sfWindow_pollEvent(*sfWindow , *sfEvent)
PrototypeC.b sfWindow_waitEvent(*sfWindow , *sfEvent)
PrototypeC.i sfWindow_getPosition(*sfWindow)
PrototypeC   sfWindow_setPosition(*sfWindow, *sfVector2i)
PrototypeC.i sfWindow_getSize(*sfWindow)
PrototypeC   sfWindow_setSize(*sfWindow, *sfVector2u)
PrototypeC   sfWindow_setTitle(*sfWindow, title.s)
PrototypeC   sfWindow_setUnicodeTitle(*sfWindow, title.s)
PrototypeC   sfWindow_setIcon(*sfWindow, width.l, height.l, *pixels)
PrototypeC   sfWindow_setVisible(*sfWindow, visible.b)
PrototypeC   sfWindow_setMouseCursorVisible(*sfWindow, visible.b)
PrototypeC   sfWindow_setVerticalSyncEnabled(*sfWindow, enabled.b)
PrototypeC   sfWindow_setKeyRepeatEnabled(*sfWindow, enabled.b)
PrototypeC   sfWindow_setActive(*sfWindow, active.b)
PrototypeC   sfWindow_display(*sfWindow)
PrototypeC   sfWindow_setFramerateLimit(*sfWindow, limit.l)
PrototypeC   sfWindow_setJoystickThreshold(*sfWindow, threshold.f)
PrototypeC.i sfWindow_getSystemHandle(*sfWindow)

Global sfWindow_create3.sfWindow_create3                                = GetFunction(PBSFML_LIBRARY,"sfWindow_create3")
Global sfWindow_create2.sfWindow_create2                                = GetFunction(PBSFML_LIBRARY,"sfWindow_create2")
Global sfWindow_create.sfWindow_create                                  = GetFunction(PBSFML_LIBRARY,"sfWindow_create")
Global sfWindow_createUnicode3.sfWindow_createUnicode3                  = GetFunction(PBSFML_LIBRARY,"sfWindow_createUnicode3")
Global sfWindow_createUnicode2.sfWindow_createUnicode2                  = GetFunction(PBSFML_LIBRARY,"sfWindow_createUnicode2")
Global sfWindow_createUnicode.sfWindow_createUnicode                    = GetFunction(PBSFML_LIBRARY,"sfWindow_createUnicode")
Global sfWindow_createFromHandle2.sfWindow_createFromHandle2            = GetFunction(PBSFML_LIBRARY,"sfWindow_createFromHandle2")
Global sfWindow_createFromHandle.sfWindow_createFromHandle              = GetFunction(PBSFML_LIBRARY,"sfWindow_createFromHandle")
Global sfWindow_destroy.sfWindow_destroy                                = GetFunction(PBSFML_LIBRARY,"sfWindow_destroy")
Global sfWindow_close.sfWindow_close                                    = GetFunction(PBSFML_LIBRARY,"sfWindow_close")
Global sfWindow_isOpen.sfWindow_isOpen                                  = GetFunction(PBSFML_LIBRARY,"sfWindow_isOpen")
Global sfWindow_getSettings.sfWindow_getSettings                        = GetFunction(PBSFML_LIBRARY,"sfWindow_getSettings")
Global sfWindow_pollEvent.sfWindow_pollEvent                            = GetFunction(PBSFML_LIBRARY,"sfWindow_pollEvent")
Global sfWindow_waitEvent.sfWindow_waitEvent                            = GetFunction(PBSFML_LIBRARY,"sfWindow_waitEvent")
Global sfWindow_getPosition.sfWindow_getPosition                        = GetFunction(PBSFML_LIBRARY,"sfWindow_getPosition")
Global sfWindow_setPosition.sfWindow_setPosition                        = GetFunction(PBSFML_LIBRARY,"sfWindow_setPosition")
Global sfWindow_getSize.sfWindow_getSize                                = GetFunction(PBSFML_LIBRARY,"sfWindow_getSize")
Global sfWindow_setSize.sfWindow_setSize                                = GetFunction(PBSFML_LIBRARY,"sfWindow_setSize")
Global sfWindow_setTitle.sfWindow_setTitle                              = GetFunction(PBSFML_LIBRARY,"sfWindow_setTitle")
Global sfWindow_setUnicodeTitle.sfWindow_setUnicodeTitle                = GetFunction(PBSFML_LIBRARY,"sfWindow_setUnicodeTitle")
Global sfWindow_setIcon.sfWindow_setIcon                                = GetFunction(PBSFML_LIBRARY,"sfWindow_setIcon")
Global sfWindow_setVisible.sfWindow_setVisible                          = GetFunction(PBSFML_LIBRARY,"sfWindow_setVisible")
Global sfWindow_setMouseCursorVisible.sfWindow_setMouseCursorVisible    = GetFunction(PBSFML_LIBRARY,"sfWindow_setMouseCursorVisible")
Global sfWindow_setVerticalSyncEnabled.sfWindow_setVerticalSyncEnabled  = GetFunction(PBSFML_LIBRARY,"sfWindow_setVerticalSyncEnabled")
Global sfWindow_setKeyRepeatEnabled.sfWindow_setKeyRepeatEnabled        = GetFunction(PBSFML_LIBRARY,"sfWindow_setKeyRepeatEnabled")
Global sfWindow_setActive.sfWindow_setActive                            = GetFunction(PBSFML_LIBRARY,"sfWindow_setActive")
Global sfWindow_display.sfWindow_display                                = GetFunction(PBSFML_LIBRARY,"sfWindow_display")
Global sfWindow_setFramerateLimit.sfWindow_setFramerateLimit            = GetFunction(PBSFML_LIBRARY,"sfWindow_setFramerateLimit")
Global sfWindow_setJoystickThreshold.sfWindow_setJoystickThreshold      = GetFunction(PBSFML_LIBRARY,"sfWindow_setJoystickThreshold")
Global sfWindow_getSystemHandle.sfWindow_getSystemHandle                = GetFunction(PBSFML_LIBRARY,"sfWindow_getSystemHandle")




;-AUDIO

Enumeration
  #sfStopped  ;Sound / music is Not playing
  #sfPaused   ;Sound / music is paused
  #sfPlaying  ;Sound / music is playing
EndEnumeration


;
;-Listener
;
PrototypeC    sfListener_setGlobalVolume(volume.f)
PrototypeC.f  sfListener_getGlobalVolume()
PrototypeC    sfListener_setPosition(*sfVector3f)
PrototypeC.i  sfListener_getPosition()
PrototypeC    sfListener_setDirection(*sfVector3f)
PrototypeC.i  sfListener_getDirection()

Global sfListener_setGlobalVolume.sfListener_setGlobalVolume          = GetFunction(PBSFML_LIBRARY,"sfListener_setGlobalVolume")
Global sfListener_getGlobalVolume.sfListener_getGlobalVolume          = GetFunction(PBSFML_LIBRARY,"sfListener_getGlobalVolume")
Global sfListener_setPosition.sfListener_setPosition                  = GetFunction(PBSFML_LIBRARY,"sfListener_setPosition")
Global sfListener_getPosition.sfListener_getPosition                  = GetFunction(PBSFML_LIBRARY,"sfListener_getPosition")
Global sfListener_setDirection.sfListener_setDirection                = GetFunction(PBSFML_LIBRARY,"sfListener_setDirection")
Global sfListener_getDirection.sfListener_getDirection                = GetFunction(PBSFML_LIBRARY,"sfListener_setDirection")

;
;-Music
;
PrototypeC.i sfMusic_createFromFile(filename.s)
PrototypeC.i sfMusic_createFromMemory(*data, sizeInBytes.l)
PrototypeC.i sfMusic_createFromStream(*stream.sfInputStream)
PrototypeC   sfMusic_destroy(*sfMusic)
PrototypeC   sfMusic_setLoop(*sfMusic, loop.b)
PrototypeC.b sfMusic_getLoop(*sfMusic)
PrototypeC.i sfMusic_getDuration(*sfMusic)
PrototypeC   sfMusic_play(*sfMusic)
PrototypeC   sfMusic_pause(*sfMusic)
PrototypeC   sfMusic_stop(*sfMusic)
PrototypeC.l sfMusic_getChannelCount(*sfMusic) 
PrototypeC.l sfMusic_getSampleRate(*sfMusic)
PrototypeC.l sfMusic_getStatus(*sfMusic)
PrototypeC.i sfMusic_getPlayingOffset(*sfMusic)
PrototypeC   sfMusic_setPitch(*sfMusic, pitch.f)
PrototypeC   sfMusic_setVolume(*sfMusic, volume.f)
PrototypeC   sfMusic_setPosition(*sfMusic, *sfVector3f)
PrototypeC   sfMusic_setRelativeToListener(*sfMusic, relative.b)
PrototypeC   sfMusic_setMinDistance(*sfMusic, distance.f)
PrototypeC   sfMusic_setAttenuation(*sfMusic, attenuation.f)
PrototypeC   sfMusic_setPlayingOffset(*sfMusic, *sfTime)
PrototypeC.f sfMusic_getPitch(*sfMusic)
PrototypeC.f sfMusic_getVolume(*sfMusic)
PrototypeC.i sfMusic_getPosition(*sfMusic)
PrototypeC.b sfMusic_isRelativeToListener(*sfMusic)
PrototypeC.f sfMusic_getMinDistance(*sfMusic)
PrototypeC.f sfMusic_getAttenuation(*sfMusic)


Global sfMusic_createFromFile.sfMusic_createFromFile                = GetFunction(PBSFML_LIBRARY,"sfMusic_createFromFile")
Global sfMusic_createFromMemory.sfMusic_createFromMemory            = GetFunction(PBSFML_LIBRARY,"sfMusic_createFromMemory")
Global sfMusic_createFromStream.sfMusic_createFromStream            = GetFunction(PBSFML_LIBRARY,"sfMusic_createFromStream")
Global sfMusic_destroy.sfMusic_destroy                              = GetFunction(PBSFML_LIBRARY,"sfMusic_destroy")
Global sfMusic_setLoop.sfMusic_setLoop                              = GetFunction(PBSFML_LIBRARY,"sfMusic_setLoop")
Global sfMusic_getLoop.sfMusic_getLoop                              = GetFunction(PBSFML_LIBRARY,"sfMusic_getLoop")
Global sfMusic_getDuration.sfMusic_getDuration                      = GetFunction(PBSFML_LIBRARY,"sfMusic_getDuration")
Global sfMusic_play.sfMusic_play                                    = GetFunction(PBSFML_LIBRARY,"sfMusic_play")
Global sfMusic_pause.sfMusic_pause                                  = GetFunction(PBSFML_LIBRARY,"sfMusic_pause")
Global sfMusic_stop.sfMusic_stop                                    = GetFunction(PBSFML_LIBRARY,"sfMusic_stop")
Global sfMusic_getChannelCount.sfMusic_getChannelCount              = GetFunction(PBSFML_LIBRARY,"sfMusic_getChannelCount")
Global sfMusic_getSampleRate.sfMusic_getSampleRate                  = GetFunction(PBSFML_LIBRARY,"sfMusic_getSampleRate")
Global sfMusic_getStatus.sfMusic_getStatus                          = GetFunction(PBSFML_LIBRARY,"sfMusic_getStatus")
Global sfMusic_getPlayingOffset.sfMusic_getPlayingOffset            = GetFunction(PBSFML_LIBRARY,"sfMusic_getPlayingOffset")
Global sfMusic_setPitch.sfMusic_setPitch                            = GetFunction(PBSFML_LIBRARY,"sfMusic_setPitch")
Global sfMusic_setVolume.sfMusic_setVolume                          = GetFunction(PBSFML_LIBRARY,"sfMusic_setVolume")
Global sfMusic_setPosition.sfMusic_setPosition                      = GetFunction(PBSFML_LIBRARY,"sfMusic_setPosition")
Global sfMusic_setRelativeToListener.sfMusic_setRelativeToListener  = GetFunction(PBSFML_LIBRARY,"sfMusic_setRelativeToListener")
Global sfMusic_setMinDistance.sfMusic_setMinDistance                = GetFunction(PBSFML_LIBRARY,"sfMusic_setMinDistance")
Global sfMusic_setAttenuation.sfMusic_setAttenuation                = GetFunction(PBSFML_LIBRARY,"sfMusic_setAttenuation")
Global sfMusic_setPlayingOffset.sfMusic_setPlayingOffset            = GetFunction(PBSFML_LIBRARY,"sfMusic_setPlayingOffset")
Global sfMusic_setMinDistance.sfMusic_setMinDistance                = GetFunction(PBSFML_LIBRARY,"sfMusic_setMinDistance")
Global sfMusic_setAttenuation.sfMusic_setAttenuation                = GetFunction(PBSFML_LIBRARY,"sfMusic_setAttenuation")
Global sfMusic_setPlayingOffset.sfMusic_setPlayingOffset            = GetFunction(PBSFML_LIBRARY,"sfMusic_setPlayingOffset")
Global sfMusic_getPitch.sfMusic_getPitch                            = GetFunction(PBSFML_LIBRARY,"sfMusic_getPitch")
Global sfMusic_getVolume.sfMusic_getVolume                          = GetFunction(PBSFML_LIBRARY,"sfMusic_getVolume")
Global sfMusic_getPosition.sfMusic_getPosition                      = GetFunction(PBSFML_LIBRARY,"sfMusic_getPosition")
Global sfMusic_isRelativeToListener.sfMusic_isRelativeToListener    = GetFunction(PBSFML_LIBRARY,"sfMusic_isRelativeToListener")
Global sfMusic_getMinDistance.sfMusic_getMinDistance                = GetFunction(PBSFML_LIBRARY,"sfMusic_getMinDistance")
Global sfMusic_getAttenuation.sfMusic_getAttenuation                = GetFunction(PBSFML_LIBRARY,"sfMusic_getAttenuation")


;
;-soundbuffer
;

PrototypeC.i sfSoundBuffer_createFromFile(filename.s)
PrototypeC.i sfSoundBuffer_createFromMemory(*datas, sizeInBytes.l)
PrototypeC.i sfSoundBuffer_createFromStream(*sfInputStream)
PrototypeC.i sfSoundBuffer_createFromSamples(*samples,sampleCount.l, channelCount.l, sampleRate.l)
PrototypeC.i sfSoundBuffer_copy(*sfSoundBuffer)
PrototypeC   sfSoundBuffer_destroy(*sfSoundBuffer)
PrototypeC.b sfSoundBuffer_saveToFile(*sfSoundBuffer ,filename.s)
PrototypeC.w sfSoundBuffer_getSamples(*sfSoundBuffer)
PrototypeC.l sfSoundBuffer_getSampleCount(*sfSoundBuffer)
PrototypeC.l sfSoundBuffer_getSampleRate(*sfSoundBuffer)
PrototypeC.l sfSoundBuffer_getChannelCount(*sfSoundBuffer)
PrototypeC.i sfSoundBuffer_getDuration(*sfSoundBuffer)


Global sfSoundBuffer_createFromFile.sfSoundBuffer_createFromFile          = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_createFromFile")
Global sfSoundBuffer_createFromMemory.sfSoundBuffer_createFromMemory      = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_createFromMemory")
Global sfSoundBuffer_createFromStream.sfSoundBuffer_createFromStream      = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_createFromStream")
Global sfSoundBuffer_createFromSamples.sfSoundBuffer_createFromSamples    = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_createFromSamples")
Global sfSoundBuffer_copy.sfSoundBuffer_copy                              = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_copy")
Global sfSoundBuffer_destroy.sfSoundBuffer_destroy                        = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_destroy")
Global sfSoundBuffer_saveToFile.sfSoundBuffer_saveToFile                  = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_saveToFile")
Global sfSoundBuffer_getSamples.sfSoundBuffer_getSamples                  = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_getSamples")
Global sfSoundBuffer_getSampleCount.sfSoundBuffer_getSampleCount          = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_getSampleCount")
Global sfSoundBuffer_getSampleRate.sfSoundBuffer_getSampleRate            = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_getSampleRate")
Global sfSoundBuffer_getChannelCount.sfSoundBuffer_getChannelCount        = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_getChannelCount")
Global sfSoundBuffer_getDuration.sfSoundBuffer_getDuration                = GetFunction(PBSFML_LIBRARY,"sfSoundBuffer_getDuration")

;
;-sound
;
PrototypeC.i sfSound_create()
PrototypeC.i sfSound_copy(*sfSound)
PrototypeC   sfSound_destroy(*sfSound)
PrototypeC   sfSound_play(*sfSound)
PrototypeC   sfSound_pause(*sfSound)
PrototypeC   sfSound_stop(*sfSound)
PrototypeC   sfSound_setBuffer(*sfSound, *sfSoundBuffer)
PrototypeC.i sfSound_getBuffer(*sfSound)
PrototypeC   sfSound_setLoop(*sfSound,  loop.b)
PrototypeC.b sfSound_getLoop(*sfSound)
PrototypeC.l sfSound_getStatus(*sfSound)
PrototypeC   sfSound_setPitch(*sfSound,  pitch.f)
PrototypeC   sfSound_setVolume(*sfSound,  volume.f)
PrototypeC   sfSound_setPosition(*sfSound, *sfVector3f )
PrototypeC   sfSound_setRelativeToListener(*sfSound ,  relative.b)
PrototypeC   sfSound_setMinDistance(*sfSound,  distance.f)
PrototypeC   sfSound_setAttenuation(*sfSound, attenuation.f)
PrototypeC   sfSound_setPlayingOffset(*sfSound, *sfTime )
PrototypeC.f sfSound_getPitch(*sfSound)
PrototypeC.f sfSound_getVolume(*sfSound)
PrototypeC.i sfSound_getPosition(*sfSound)
PrototypeC.b sfSound_isRelativeToListener(*sfSound)
PrototypeC.f sfSound_getMinDistance(*sfSound)
PrototypeC.f sfSound_getAttenuation(*sfSound)
PrototypeC.i sfSound_getPlayingOffset(*sfSound)


Global sfSound_create.sfSound_create                                = GetFunction(PBSFML_LIBRARY,"sfSound_create")
Global sfSound_copy.sfSound_copy                                    = GetFunction(PBSFML_LIBRARY,"sfSound_copy")
Global sfSound_destroy.sfSound_destroy                              = GetFunction(PBSFML_LIBRARY,"sfSound_destroy")
Global sfSound_play.sfSound_play                                    = GetFunction(PBSFML_LIBRARY,"sfSound_play")
Global sfSound_pause.sfSound_pause                                  = GetFunction(PBSFML_LIBRARY,"sfSound_pause")
Global sfSound_stop.sfSound_stop                                    = GetFunction(PBSFML_LIBRARY,"sfSound_stop")
Global sfSound_setBuffer.sfSound_setBuffer                          = GetFunction(PBSFML_LIBRARY,"sfSound_setBuffer")
Global sfSound_getBuffer.sfSound_getBuffer                          = GetFunction(PBSFML_LIBRARY,"sfSound_getBuffer")
Global sfSound_setLoop.sfSound_setLoop                              = GetFunction(PBSFML_LIBRARY,"sfSound_setLoop")
Global sfSound_getLoop.sfSound_getLoop                              = GetFunction(PBSFML_LIBRARY,"sfSound_getLoop")
Global sfSound_getStatus.sfSound_getStatus                          = GetFunction(PBSFML_LIBRARY,"sfSound_getStatus")
Global sfSound_setPitch.sfSound_setPitch                            = GetFunction(PBSFML_LIBRARY,"sfSound_setPitch")
Global sfSound_setVolume.sfSound_setVolume                          = GetFunction(PBSFML_LIBRARY,"sfSound_setVolume")
Global sfSound_setRelativeToListener.sfSound_setRelativeToListener  = GetFunction(PBSFML_LIBRARY,"sfSound_setRelativeToListener")
Global sfSound_setMinDistance.sfSound_setMinDistance                = GetFunction(PBSFML_LIBRARY,"sfSound_setMinDistance")
Global sfSound_setAttenuation.sfSound_setAttenuation                = GetFunction(PBSFML_LIBRARY,"sfSound_setAttenuation")
Global sfSound_setPlayingOffset.sfSound_setPlayingOffset            = GetFunction(PBSFML_LIBRARY,"sfSound_setPlayingOffset")
Global sfSound_getPitch.sfSound_getPitch                            = GetFunction(PBSFML_LIBRARY,"sfSound_getPitch")
Global sfSound_getVolume.sfSound_getVolume                          = GetFunction(PBSFML_LIBRARY,"sfSound_getVolume")
Global sfSound_getPosition.sfSound_getPosition                      = GetFunction(PBSFML_LIBRARY,"sfSound_getPosition")
Global sfSound_isRelativeToListener.sfSound_isRelativeToListener    = GetFunction(PBSFML_LIBRARY,"sfSound_isRelativeToListener")
Global sfSound_getMinDistance.sfSound_getMinDistance                = GetFunction(PBSFML_LIBRARY,"sfSound_getMinDistance")
Global sfSound_getAttenuation.sfSound_getAttenuation                = GetFunction(PBSFML_LIBRARY,"sfSound_getAttenuation")
Global sfSound_getPlayingOffset.sfSound_getPlayingOffset            = GetFunction(PBSFML_LIBRARY,"sfSound_getPlayingOffset")

;
;-soundBufferRecorder
;
PrototypeC.i sfSoundBufferRecorder_create()
PrototypeC   sfSoundBufferRecorder_destroy(*soundBufferRecorder)
PrototypeC   sfSoundBufferRecorder_start(*soundBufferRecorder, sampleRate.l)
PrototypeC   sfSoundBufferRecorder_stop(*soundBufferRecorder)
PrototypeC.l sfSoundBufferRecorder_getSampleRate(*soundBufferRecorder)
PrototypeC.i sfSoundBufferRecorder_getBuffer(*soundBufferRecorder)

Global sfSoundBufferRecorder_create.sfSoundBufferRecorder_create                = GetFunction(PBSFML_LIBRARY,"sfSoundBufferRecorder_create")
Global sfSoundBufferRecorder_destroy.sfSoundBufferRecorder_destroy              = GetFunction(PBSFML_LIBRARY,"sfSoundBufferRecorder_destroy")
Global sfSoundBufferRecorder_start.sfSoundBufferRecorder_start                  = GetFunction(PBSFML_LIBRARY,"sfSoundBufferRecorder_start")
Global sfSoundBufferRecorder_stop.sfSoundBufferRecorder_stop                    = GetFunction(PBSFML_LIBRARY,"sfSoundBufferRecorder_stop")
Global sfSoundBufferRecorder_getSampleRate.sfSoundBufferRecorder_getSampleRate  = GetFunction(PBSFML_LIBRARY,"sfSoundBufferRecorder_getSampleRate")
Global sfSoundBufferRecorder_getBuffer.sfSoundBufferRecorder_getBuffer          = GetFunction(PBSFML_LIBRARY,"sfSoundBufferRecorder_getBuffer")


;
;-soundRecorder
;

; *onStart signature   : onStart.b()
; *onProcess signature : onProcess.b(*wordArray, size.l)
; *onStop signature    : onStop.b()
PrototypeC.i sfSoundRecorder_create(*onStart, *onProcess, *onStop, *userData)
PrototypeC   sfSoundRecorder_destroy(*sfSoundRecorder)
PrototypeC   sfSoundRecorder_start(*sfSoundRecorder, sampleRate.l)
PrototypeC   sfSoundRecorder_stop(*sfSoundRecorder)
PrototypeC.l sfSoundRecorder_getSampleRate(*sfSoundRecorder)
PrototypeC.l sfSoundRecorder_isAvailable()

Global sfSoundRecorder_create.sfSoundRecorder_create                = GetFunction(PBSFML_LIBRARY,"sfSoundRecorder_create")
Global sfSoundRecorder_destroy.sfSoundRecorder_destroy              = GetFunction(PBSFML_LIBRARY,"sfSoundRecorder_destroy")
Global sfSoundRecorder_start.sfSoundRecorder_start                  = GetFunction(PBSFML_LIBRARY,"sfSoundRecorder_start")
Global sfSoundRecorder_stop.sfSoundRecorder_stop                    = GetFunction(PBSFML_LIBRARY,"sfSoundRecorder_stop")
Global sfSoundRecorder_getSampleRate.sfSoundRecorder_getSampleRate  = GetFunction(PBSFML_LIBRARY,"sfSoundRecorder_getSampleRate")
Global sfSoundRecorder_isAvailable.sfSoundRecorder_isAvailable  = GetFunction(PBSFML_LIBRARY,"sfSoundRecorder_isAvailable")



;
;-soundStream
;

Structure sfSoundStreamChunk
    *samples      ;Pointer to the audio samples ( word .w )
    sampleCount.l ;Number of samples pointed by Samples
EndStructure


; *onGetData signature : onGetData.b(*ptr.sfSoundStreamChunk, *void)
; *onGetData signature : *onSeek(*sfTime, *void) <--- CHECK FOR SF::TIME BUG

PrototypeC.i sfSoundStream_create(*onGetData, *onSeek, channelCount.l, sampleRate.l,*userData)
PrototypeC   sfSoundStream_destroy(*sfSoundStream)
PrototypeC   sfSoundStream_play(*sfSoundStream)
PrototypeC   sfSoundStream_pause(*sfSoundStream)
PrototypeC   sfSoundStream_stop(*sfSoundStream)
PrototypeC.l sfSoundStream_getStatus(*sfSoundStream)
PrototypeC.l sfSoundStream_getChannelCount(*sfSoundStream)
PrototypeC.l sfSoundStream_getSampleRate(*sfSoundStream)
PrototypeC   sfSoundStream_setPitch(*sfSoundStream, pitch.f)
PrototypeC   sfSoundStream_setVolume(*sfSoundStream, volume.f)
PrototypeC   sfSoundStream_setPosition(*sfSoundStream, *sfVector3f)
PrototypeC   sfSoundStream_setRelativeToListener(*sfSoundStream, relative.b)
PrototypeC   sfSoundStream_setMinDistance(*sfSoundStream, distance.f)
PrototypeC   sfSoundStream_setAttenuation(*sfSoundStream, attenuation.f)
PrototypeC   sfSoundStream_setPlayingOffset(*sfSoundStream, *sfTime)
PrototypeC   sfSoundStream_setLoop(*sfSoundStream, loop.b)
PrototypeC.f sfSoundStream_getPitch(*sfSoundStream)
PrototypeC.f sfSoundStream_getVolume(*sfSoundStream)
PrototypeC.i sfSoundStream_getPosition(*sfSoundStream)
PrototypeC.b sfSoundStream_isRelativeToListener(*sfSoundStream)
PrototypeC.f sfSoundStream_getMinDistance(*sfSoundStream)
PrototypeC.f sfSoundStream_getAttenuation(*sfSoundStream)
PrototypeC.b sfSoundStream_getLoop(*sfSoundStream)
PrototypeC.i sfSoundStream_getPlayingOffset(*sfSoundStream)

Global sfSoundStream_create.sfSoundStream_create                                = GetFunction(PBSFML_LIBRARY,"sfSoundStream_create")
Global sfSoundStream_destroy.sfSoundStream_destroy                              = GetFunction(PBSFML_LIBRARY,"sfSoundStream_destroy")
Global sfSoundStream_play.sfSoundStream_play                                    = GetFunction(PBSFML_LIBRARY,"sfSoundStream_play")
Global sfSoundStream_pause.sfSoundStream_pause                                  = GetFunction(PBSFML_LIBRARY,"sfSoundStream_pause")
Global sfSoundStream_stop.sfSoundStream_stop                                    = GetFunction(PBSFML_LIBRARY,"sfSoundStream_stop")
Global sfSoundStream_getStatus.sfSoundStream_getStatus                          = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getStatus")
Global sfSoundStream_getChannelCount.sfSoundStream_getChannelCount              = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getChannelCount")
Global sfSoundStream_getSampleRate.sfSoundStream_getSampleRate                  = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getSampleRate")
Global sfSoundStream_getSampleRate.sfSoundStream_getSampleRate                  = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getSampleRate")
Global sfSoundStream_setPitch.sfSoundStream_setPitch                            = GetFunction(PBSFML_LIBRARY,"sfSoundStream_setPitch")
Global sfSoundStream_create.sfSoundStream_setVolume                             = GetFunction(PBSFML_LIBRARY,"sfSoundStream_setVolume")
Global sfSoundStream_setPosition.sfSoundStream_setPosition                      = GetFunction(PBSFML_LIBRARY,"sfSoundStream_setPosition")
Global sfSoundStream_setRelativeToListener.sfSoundStream_setRelativeToListener  = GetFunction(PBSFML_LIBRARY,"sfSoundStream_setRelativeToListener")
Global sfSoundStream_setMinDistance.sfSoundStream_setMinDistance                = GetFunction(PBSFML_LIBRARY,"sfSoundStream_setMinDistance")
Global sfSoundStream_setAttenuation.sfSoundStream_setAttenuation                = GetFunction(PBSFML_LIBRARY,"sfSoundStream_setAttenuation")
Global sfSoundStream_setPlayingOffset.sfSoundStream_setPlayingOffset            = GetFunction(PBSFML_LIBRARY,"sfSoundStream_setPlayingOffset")
Global sfSoundStream_setLoop.sfSoundStream_setLoop                              = GetFunction(PBSFML_LIBRARY,"sfSoundStream_setLoop")
Global sfSoundStream_getPitch.sfSoundStream_getPitch                            = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getPitch")
Global sfSoundStream_getVolume.sfSoundStream_getVolume                          = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getVolume")
Global sfSoundStream_getPosition.sfSoundStream_getPosition                      = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getPosition")
Global sfSoundStream_isRelativeToListener.sfSoundStream_isRelativeToListener    = GetFunction(PBSFML_LIBRARY,"sfSoundStream_isRelativeToListener")
Global sfSoundStream_getMinDistance.sfSoundStream_getMinDistance                = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getMinDistance")
Global sfSoundStream_getAttenuation.sfSoundStream_getAttenuation                = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getAttenuation")
Global sfSoundStream_getLoop.sfSoundStream_getLoop                              = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getLoop")
Global sfSoundStream_getPlayingOffset.sfSoundStream_getPlayingOffset            = GetFunction(PBSFML_LIBRARY,"sfSoundStream_getPlayingOffset")









; If sfSoundRecorder_isAvailable() = #True 
;   recorder = sfSoundBufferRecorder_create()
;   sfSoundBufferRecorder_start(recorder,44100)
;   Delay(10000)
;   sfSoundBufferRecorder_stop(recorder)
;   buffer = sfSoundBufferRecorder_getBuffer(recorder)
;   sound = sfSound_create()
;   sfSound_setBuffer(sound,buffer)
;   sfSound_play(sound)
;   Delay(10000)
;   End 
; EndIf 



; OpenConsole()
; 
; #SAMPLES     = 44100
; #SAMPLE_RATE = 44100
; #AMPLITUDE   = 20000
; 
; Dim rawData.w(#SAMPLES)
; 
; TWO_PI.d = #PI * 2
; increment.d = 1000/#SAMPLES
; x.d = 0
; For i = 0 To #SAMPLES-1
;   rawData(i) = #AMPLITUDE * Sin(x*TWO_PI)
;   x + increment
; Next 
; 
; ; 
; 
; soundBuffer = sfSoundBuffer_createFromSamples(@rawData(),#SAMPLES,1,#SAMPLE_RATE)
; 
; customSound = sfSound_create()
; sfSound_setBuffer(customSound,soundBuffer)
; ; 
;  sfSound_play(customSound)
; ; 
;  Delay(5000)
; 
; 
; 
; 
;  PrintN("Good bye!")
;  Delay(100)
;  End 






; *music = sfMusic_createFromFile("./ambiant.wav")
;  sfMusic_play(*music)
; End 
; ; 
;  time = sfMusic_getDuration(*music)
; ; ; 
;   Debug sfTime_asSeconds(time)
;   sfTime_destroy(time)
; ; 
; ; 
;  Delay(5000)
poshu
Messages : 1138
Inscription : sam. 31/juil./2004 22:32

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par poshu »

Oki, merci, j'vais m'y mettre demain ^_^
(p'té, la croix et la bannière de trouver un client svn vaguement correct sous OS X... Bon, en tous cas c'est synchro)
G-Rom
Messages : 3641
Inscription : dim. 10/janv./2010 5:29

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par G-Rom »

vu que tu est sous macosx , il faut que tu regardes dans Config.hpp à la ligne 92 :

Code : Tout sélectionner

#if defined(__MINGW64__) || defined(_M_IA64)
	typedef long long int 		PB_INTEGER;
#elif defined(__MINGW32__) || defined(_M_IX86)
	typedef long int			PB_INTEGER;
#endif 
Il faut que tu vérifie les macros de ton compilateur et les rajouté si besoin.
G-Rom
Messages : 3641
Inscription : dim. 10/janv./2010 5:29

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par G-Rom »

@poshu, tu as pu jeter un coup d'oeil aux sources ?
poshu
Messages : 1138
Inscription : sam. 31/juil./2004 22:32

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par poshu »

Vi, mais j'ai été pas mal pris là, j'y touche doucement mais surement.
Avatar de l’utilisateur
majikeyric
Messages : 602
Inscription : dim. 08/déc./2013 23:19
Contact :

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par majikeyric »

G-Rom, Poshu vous avez continué à travailler dessus ?

Ces derniers jours je me suis un peu intéréssé à CSFML.
G-Rom
Messages : 3641
Inscription : dim. 10/janv./2010 5:29

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par G-Rom »

J'ai laisser pissé et j'ai supprimer le code. Si tu veut faire de la SFML , passe au C/C++ , c'est plus simple :)
poshu
Messages : 1138
Inscription : sam. 31/juil./2004 22:32

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par poshu »

Nop, terriblement pas le temps et je n'utilise plus pure pour le jeu (justement parce qu'il manque un truc type SFML...)
Avatar de l’utilisateur
majikeyric
Messages : 602
Inscription : dim. 08/déc./2013 23:19
Contact :

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par majikeyric »

Je me suis re-installé Visual Studio pour tester un peu.
G-Rom
Messages : 3641
Inscription : dim. 10/janv./2010 5:29

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par G-Rom »

@majikeyric, l'usine a gaz :mrgreen:
notepad++ & mingw / cmake sous windows , plus "light" et portable ^^
j'utilise cmake ( cmake gui ) sous windows.
avec un simple fichier CMakelists.txt et ceci dedans :
cmake_minimum_required(VERSION 2.6)
set(PROJECT_NAME MonProjet)

#C++11
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wfatal-errors -pedantic")

#Configuration du projet
project(${PROJECT_NAME})

set(EXECUTABLE_OUTPUT_PATH ../bin/${CMAKE_BUILD_TYPE})

#include
include_directories(include)

#Source
file(
GLOB_RECURSE
source_files
src/*
)

#Creation de l'exécutable
add_executable(
${PROJECT_NAME}
${source_files}
)

# dependances
target_link_libraries(
${PROJECT_NAME}
-lsfml-system
-lsfml-graphics
-lsfml-audio
-lsfml-network
)
je peu compilé a la console via make sans problèmes.


Mon dossier sources ressemble a cela
./src/
./include/
./build/
./bin/
CMakeList.txt
mes fichier .cpp dans src , les includes dans include , le binaire ira dans ./bin/ , et le dossier build me sert à fabriquer via cmake-gui le projet
je lance "make" a partir de ./build/ et le tour est joué
v'la un petit template que j'ai fait pour windows :
https://drive.google.com/file/d/0B8rcgU ... sp=sharing
il te faut cmake-gui / mingw & la sfml bien entendu ^^
Avatar de l’utilisateur
majikeyric
Messages : 602
Inscription : dim. 08/déc./2013 23:19
Contact :

Re: CSFML 2.1 pour pure basic, tous ensemble!

Message par majikeyric »

Merci G-Rom, ça peut m'être utile, par curiosité je vais jeter un oeil à cette alternative.
Répondre