Add GopherJS bindings for raylib.js

This commit is contained in:
Milan Nikolic 2017-12-08 05:38:13 +01:00
parent 6de595f396
commit 2bfca1f330
9 changed files with 1592 additions and 111 deletions

View file

@ -17,30 +17,15 @@ func (w *Wave) cptr() *C.Wave {
return (*C.Wave)(unsafe.Pointer(w))
}
// newWaveFromPointer - Returns new Wave from pointer
func newWaveFromPointer(ptr unsafe.Pointer) Wave {
return *(*Wave)(ptr)
}
func (s *Sound) cptr() *C.Sound {
return (*C.Sound)(unsafe.Pointer(s))
}
// newSoundFromPointer - Returns new Sound from pointer
func newSoundFromPointer(ptr unsafe.Pointer) Sound {
return *(*Sound)(ptr)
}
// cptr returns C pointer
func (a *AudioStream) cptr() *C.AudioStream {
return (*C.AudioStream)(unsafe.Pointer(a))
}
// newAudioStreamFromPointer - Returns new AudioStream from pointer
func newAudioStreamFromPointer(ptr unsafe.Pointer) AudioStream {
return *(*AudioStream)(ptr)
}
// InitAudioDevice - Initialize audio device and context
func InitAudioDevice() {
C.InitAudioDevice()