From 388934e43c791878f96d765bbb1a798a03ea5983 Mon Sep 17 00:00:00 2001 From: Michelangelo Camaioni <42435587+Genio2003@users.noreply.github.com> Date: Tue, 27 Feb 2024 07:40:46 +0100 Subject: [PATCH] sdl: updated TODO markings (#590) --- sdl/audio.go | 8 ++++---- sdl/cpuinfo.go | 12 ++++++------ sdl/gamecontroller.go | 30 +++++++++++++++--------------- sdl/joystick.go | 22 +++++++++++----------- sdl/rect.go | 4 ++-- sdl/render.go | 26 +++++++++++++------------- sdl/surface.go | 8 ++++---- sdl/system.go | 2 +- sdl/touch.go | 2 +- 9 files changed, 57 insertions(+), 57 deletions(-) diff --git a/sdl/audio.go b/sdl/audio.go index 2cbcfcf0..e479b1ce 100644 --- a/sdl/audio.go +++ b/sdl/audio.go @@ -588,7 +588,7 @@ func CloseAudioDevice(dev AudioDeviceID) { } // NewAudioStream creates a new audio stream -// TODO: (https://wiki.libsdl.org/SDL_NewAudioStream) +// (https://wiki.libsdl.org/SDL_NewAudioStream) func NewAudioStream(srcFormat AudioFormat, srcChannels uint8, srcRate int, dstFormat AudioFormat, dstChannels uint8, dstRate int) (stream *AudioStream, err error) { _srcFormat := C.SDL_AudioFormat(srcFormat) _srcChannels := C.Uint8(srcChannels) @@ -605,7 +605,7 @@ func NewAudioStream(srcFormat AudioFormat, srcChannels uint8, srcRate int, dstFo } // Put adds data to be converted/resampled to the stream -// TODO: (https://wiki.libsdl.org/SDL_AudioStreamPut) +// (https://wiki.libsdl.org/SDL_AudioStreamPut) func (stream *AudioStream) Put(buf []byte) (err error) { sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&buf)) _buf := unsafe.Pointer(sliceHeader.Data) @@ -637,7 +637,7 @@ func (stream *AudioStream) Available() (n int) { // Flush tells the stream that you're done sending data, and anything being buffered // should be converted/resampled and made available immediately. -// TODO: (https://wiki.libsdl.org/SDL_AudioStreamFlush) +// (https://wiki.libsdl.org/SDL_AudioStreamFlush) func (stream *AudioStream) Flush() (err error) { ret := int(C.SDL_AudioStreamFlush(stream.cptr())) err = errorFromInt(ret) @@ -645,7 +645,7 @@ func (stream *AudioStream) Flush() (err error) { } // Clear clears any pending data in the stream without converting it -// TODO: (https://wiki.libsdl.org/SDL_AudioStreamClear) +// (https://wiki.libsdl.org/SDL_AudioStreamClear) func (stream *AudioStream) Clear() { C.SDL_AudioStreamClear(stream.cptr()) } diff --git a/sdl/cpuinfo.go b/sdl/cpuinfo.go index 1121f9e6..1cce1552 100644 --- a/sdl/cpuinfo.go +++ b/sdl/cpuinfo.go @@ -225,7 +225,7 @@ func HasAVX() bool { } // HasAVX512F reports whether the CPU has AVX-512F (foundation) features. -// TODO: (https://wiki.libsdl.org/SDL_HasAVX512F) +// (https://wiki.libsdl.org/SDL_HasAVX512F) func HasAVX512F() bool { return C.SDL_HasAVX512F() > 0 } @@ -237,7 +237,7 @@ func HasAVX2() bool { } // HasARMSIMD reports whether the CPU has ARM SIMD (ARMv6) features. -// TODO: (https://wiki.libsdl.org/SDL_HasARMSIMD) +// (https://wiki.libsdl.org/SDL_HasARMSIMD) func HasARMSIMD() bool { return C.SDL_HasARMSIMD() > 0 } @@ -249,25 +249,25 @@ func HasNEON() bool { } // SIMDGetAlignment reports the alignment this system needs for SIMD allocations. -// TODO: (https://wiki.libsdl.org/SDL_SIMDGetAlignment) +// (https://wiki.libsdl.org/SDL_SIMDGetAlignment) func SIMDGetAlignment() int { return int(C.SDL_SIMDGetAlignment()) } // SIMDAlloc allocates memory in a SIMD-friendly way. -// TODO: (https://wiki.libsdl.org/SDL_SIMDAlloc) +// (https://wiki.libsdl.org/SDL_SIMDAlloc) func SIMDAlloc(_len int) unsafe.Pointer { return C.SDL_SIMDAlloc(C.size_t(_len)) } // SIMDRealloc reallocates memory obtained from SDL_SIMDAlloc. -// TODO: (https://wiki.libsdl.org/SDL_SIMDRealloc) +// (https://wiki.libsdl.org/SDL_SIMDRealloc) func SIMDRealloc(mem unsafe.Pointer, _len int) unsafe.Pointer { return C.SDL_SIMDRealloc(mem, C.size_t(_len)) } // SIMDFree deallocates memory obtained from SDL_SIMDAlloc. -// TODO: (https://wiki.libsdl.org/SDL_SIMDFree) +// (https://wiki.libsdl.org/SDL_SIMDFree) func SIMDFree(p unsafe.Pointer) { C.SDL_SIMDFree(p) } diff --git a/sdl/gamecontroller.go b/sdl/gamecontroller.go index 7ec49e8b..77d8e908 100644 --- a/sdl/gamecontroller.go +++ b/sdl/gamecontroller.go @@ -493,13 +493,13 @@ func (ctrl *GameController) Type() GameControllerType { } // PlayerIndex the player index of an opened game controller, or -1 if it's not available. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerGetPlayerIndex) +// (https://wiki.libsdl.org/SDL_GameControllerGetPlayerIndex) func (ctrl *GameController) PlayerIndex() int { return int(C.SDL_GameControllerGetPlayerIndex(ctrl.cptr())) } // SetPlayerIndex sets the player index of an opened game controller. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerSetPlayerIndex) +// (https://wiki.libsdl.org/SDL_GameControllerSetPlayerIndex) func (ctrl *GameController) SetPlayerIndex(playerIndex int) { C.SDL_GameControllerSetPlayerIndex(ctrl.cptr(), C.int(playerIndex)) } @@ -526,7 +526,7 @@ func (ctrl *GameController) FirmwareVersion() uint16 { } // Serial returns the serial number of an opened controller, if available. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerGetSerial) +// (https://wiki.libsdl.org/SDL_GameControllerGetSerial) func (ctrl *GameController) Serial() string { return C.GoString(C.SDL_GameControllerGetSerial(ctrl.cptr())) } @@ -584,7 +584,7 @@ func (ctrl *GameController) BindForAxis(axis GameControllerAxis) GameControllerB } // HasAxis returns whether a game controller has a given axis. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerHasAxis) +// (https://wiki.libsdl.org/SDL_GameControllerHasAxis) func (ctrl *GameController) HasAxis(axis GameControllerAxis) bool { return C.SDL_GameControllerHasAxis(ctrl.cptr(), axis.c()) == C.SDL_TRUE } @@ -630,25 +630,25 @@ func (ctrl *GameController) HasButton(btn GameControllerButton) bool { // // Returns error if rumble isn't supported on this joystick. // -// TODO: (https://wiki.libsdl.org/SDL_GameControllerRumble) +// (https://wiki.libsdl.org/SDL_GameControllerRumble) func (ctrl *GameController) Rumble(lowFrequencyRumble, highFrequencyRumble uint16, durationMS uint32) error { return errorFromInt(int(C.SDL_GameControllerRumble(ctrl.cptr(), C.Uint16(lowFrequencyRumble), C.Uint16(highFrequencyRumble), C.Uint32(durationMS)))) } // RumbleTriggers starts a rumble effect in the game controller's triggers. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerRumbleTriggers) +// (https://wiki.libsdl.org/SDL_GameControllerRumbleTriggers) func (ctrl *GameController) RumbleTriggers(leftRumble, rightRumble uint16, durationMS uint32) error { return errorFromInt(int(C.SDL_GameControllerRumble(ctrl.cptr(), C.Uint16(leftRumble), C.Uint16(rightRumble), C.Uint32(durationMS)))) } // HasLED returns whether a controller has an LED. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerHasLED) +// (https://wiki.libsdl.org/SDL_GameControllerHasLED) func (ctrl *GameController) HasLED() bool { return C.SDL_GameControllerHasLED(ctrl.cptr()) == C.SDL_TRUE } // SetLED updates a controller's LED color. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerSetLED) +// (https://wiki.libsdl.org/SDL_GameControllerSetLED) func (ctrl *GameController) SetLED(red, green, blue uint8) error { return errorFromInt(int(C.SDL_GameControllerSetLED(ctrl.cptr(), C.Uint8(red), C.Uint8(blue), C.Uint8(green)))) } @@ -660,44 +660,44 @@ func (ctrl *GameController) Button(btn GameControllerButton) byte { } // NumTouchpads returns the number of touchpads on a game controller. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerGetNumTouchpads) +// (https://wiki.libsdl.org/SDL_GameControllerGetNumTouchpads) func (ctrl *GameController) NumTouchpads() int { return int(C.SDL_GameControllerGetNumTouchpads(ctrl.cptr())) } // NumTouchpadFingers returns the number of supported simultaneous fingers on a touchpad on a game controller. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerGetNumTouchpadFingers) +// (https://wiki.libsdl.org/SDL_GameControllerGetNumTouchpadFingers) func (ctrl *GameController) NumTouchpadFingers(touchpad int) int { return int(C.SDL_GameControllerGetNumTouchpadFingers(ctrl.cptr(), C.int(touchpad))) } // TouchpadFinger returns the current state of a finger on a touchpad on a game controller. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerGetTouchpadFinger) +// (https://wiki.libsdl.org/SDL_GameControllerGetTouchpadFinger) func (ctrl *GameController) TouchpadFinger(touchpad, finger int) (state uint8, x, y, pressure float32) { C.SDL_GameControllerGetTouchpadFinger(ctrl.cptr(), C.int(touchpad), C.int(finger), (*C.Uint8)(&state), (*C.float)(&x), (*C.float)(&y), (*C.float)(&pressure)) return } // HasSensor returns whether a game controller has a particular sensor. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerHasSensor) +// (https://wiki.libsdl.org/SDL_GameControllerHasSensor) func (ctrl *GameController) HasSensor(typ SensorType) bool { return C.SDL_GameControllerHasSensor(ctrl.cptr(), C.SDL_SensorType(typ)) == C.SDL_TRUE } // SetSensorEnabled sets whether data reporting for a game controller sensor is enabled. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerSetSensorEnabled) +// (https://wiki.libsdl.org/SDL_GameControllerSetSensorEnabled) func (ctrl *GameController) SetSensorEnabled(typ SensorType, enabled bool) error { return errorFromInt(int(C.SDL_GameControllerSetSensorEnabled(ctrl.cptr(), C.SDL_SensorType(typ), C.SDL_bool(Btoi(enabled))))) } // IsSensorEnabled queries whether sensor data reporting is enabled for a game controller. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerIsSensorEnabled) +// (https://wiki.libsdl.org/SDL_GameControllerIsSensorEnabled) func (ctrl *GameController) IsSensorEnabled(typ SensorType) bool { return C.SDL_GameControllerIsSensorEnabled(ctrl.cptr(), C.SDL_SensorType(typ)) == C.SDL_TRUE } // SensorData returns the current state of a game controller sensor. -// TODO: (https://wiki.libsdl.org/SDL_GameControllerGetSensorData) +// (https://wiki.libsdl.org/SDL_GameControllerGetSensorData) func (ctrl *GameController) SensorData(typ SensorType, numValues int) (data []float32, err error) { err = errorFromInt(int(C.SDL_GameControllerGetSensorData(ctrl.cptr(), C.SDL_SensorType(typ), (*C.float)(&data[0]), C.int(numValues)))) return diff --git a/sdl/joystick.go b/sdl/joystick.go index 6083dc12..f74afa58 100644 --- a/sdl/joystick.go +++ b/sdl/joystick.go @@ -486,7 +486,7 @@ func JoystickPathForIndex(index int) string { } // JoystickGetDevicePlayerIndex returns the player index of a joystick, or -1 if it's not available -// TODO: (https://wiki.libsdl.org/SDL_JoystickGetDevicePlayerIndex) +// (https://wiki.libsdl.org/SDL_JoystickGetDevicePlayerIndex) func JoystickGetDevicePlayerIndex(index int) int { return int(C.SDL_JoystickGetDevicePlayerIndex(C.int(index))) } @@ -565,13 +565,13 @@ func JoystickFromInstanceID(joyid JoystickID) *Joystick { } // JoystickFromPlayerIndex returns the Joystick associated with a player index. -// TODO: (https://wiki.libsdl.org/SDL_JoystickFromPlayerIndex) +// (https://wiki.libsdl.org/SDL_JoystickFromPlayerIndex) func JoystickFromPlayerIndex(playerIndex int) *Joystick { return (*Joystick)(C.SDL_JoystickFromPlayerIndex(C.int(playerIndex))) } // JoystickAttachVirtual attaches a new virtual joystick. -// TODO: (https://wiki.libsdl.org/SDL_JoystickAttachVirtual) +// (https://wiki.libsdl.org/SDL_JoystickAttachVirtual) func JoystickAttachVirtual(typ JoystickType, naxes, nbuttons, nhats int) (deviceIndex int, err error) { deviceIndex = int(C.SDL_JoystickAttachVirtual(C.SDL_JoystickType(typ), C.int(naxes), C.int(nbuttons), C.int(nhats))) err = errorFromInt(deviceIndex) @@ -587,13 +587,13 @@ func JoystickAttachVirtualEx(desc *C.SDL_VirtualJoystickDesc) (deviceIndex int, } // JoystickDetachVirtual detaches a virtual joystick. -// TODO: (https://wiki.libsdl.org/SDL_JoystickDetachVirtual) +// (https://wiki.libsdl.org/SDL_JoystickDetachVirtual) func JoystickDetachVirtual(deviceIndex int) error { return errorFromInt(int(C.SDL_JoystickDetachVirtual(C.int(deviceIndex)))) } // JoystickIsVirtual indicates whether or not a virtual-joystick is at a given device index. -// TODO: (https://wiki.libsdl.org/SDL_JoystickIsVirtual) +// (https://wiki.libsdl.org/SDL_JoystickIsVirtual) func JoystickIsVirtual(deviceIndex int) bool { return C.SDL_JoystickIsVirtual(C.int(deviceIndex)) == C.SDL_TRUE } @@ -604,7 +604,7 @@ func JoystickIsVirtual(deviceIndex int) bool { // or can be called indirectly through various other SDL APIS, // including, but not limited to the following: SDL_PollEvent, // SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.. -// TODO: (https://wiki.libsdl.org/SDL_JoystickSetVirtualAxis) +// (https://wiki.libsdl.org/SDL_JoystickSetVirtualAxis) func (joy *Joystick) SetVirtualAxis(axis int, value int16) error { return errorFromInt(int(C.SDL_JoystickSetVirtualAxis(joy.cptr(), C.int(axis), C.Sint16(value)))) } @@ -615,7 +615,7 @@ func (joy *Joystick) SetVirtualAxis(axis int, value int16) error { // or can be called indirectly through various other SDL APIS, // including, but not limited to the following: SDL_PollEvent, // SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.. -// TODO: (https://wiki.libsdl.org/SDL_JoystickSetVirtualButton) +// (https://wiki.libsdl.org/SDL_JoystickSetVirtualButton) func (joy *Joystick) SetVirtualButton(button int, value uint8) error { return errorFromInt(int(C.SDL_JoystickSetVirtualButton(joy.cptr(), C.int(button), C.Uint8(value)))) } @@ -626,19 +626,19 @@ func (joy *Joystick) SetVirtualButton(button int, value uint8) error { // or can be called indirectly through various other SDL APIS, // including, but not limited to the following: SDL_PollEvent, // SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.. -// TODO: (https://wiki.libsdl.org/SDL_JoystickSetVirtualHat) +// (https://wiki.libsdl.org/SDL_JoystickSetVirtualHat) func (joy *Joystick) SetVirtualHat(hat int, value uint8) error { return errorFromInt(int(C.SDL_JoystickSetVirtualHat(joy.cptr(), C.int(hat), C.Uint8(value)))) } // LockJoysticks locks joysticks for multi-threaded access to the joystick API -// TODO: (https://wiki.libsdl.org/SDL_LockJoysticks) +// (https://wiki.libsdl.org/SDL_LockJoysticks) func LockJoysticks() { C.SDL_LockJoysticks() } // UnlockJoysticks unlocks joysticks for multi-threaded access to the joystick API -// TODO: (https://wiki.libsdl.org/SDL_UnlockJoysticks) +// (https://wiki.libsdl.org/SDL_UnlockJoysticks) func UnlockJoysticks() { C.SDL_UnlockJoysticks() } @@ -782,7 +782,7 @@ func (joy *Joystick) Button(button int) byte { // // Returns error if rumble isn't supported on this joystick. // -// TODO: (https://wiki.libsdl.org/SDL_JoystickRumble) +// (https://wiki.libsdl.org/SDL_JoystickRumble) func (joy *Joystick) Rumble(lowFrequencyRumble, highFrequencyRumble uint16, durationMS uint32) error { return errorFromInt(int(C.SDL_JoystickRumble(joy.cptr(), C.Uint16(lowFrequencyRumble), C.Uint16(highFrequencyRumble), C.Uint32(durationMS)))) } diff --git a/sdl/rect.go b/sdl/rect.go index aa6ffd7d..e57935d1 100644 --- a/sdl/rect.go +++ b/sdl/rect.go @@ -24,14 +24,14 @@ type Rect struct { } // FPoint defines a two dimensional point. -// TODO: (https://wiki.libsdl.org/SDL_FPoint) +// (https://wiki.libsdl.org/SDL_FPoint) type FPoint struct { X float32 // the x coordinate of the point Y float32 // the y coordinate of the point } // FRect contains the definition of a rectangle, with the origin at the upper left. -// TODO: (https://wiki.libsdl.org/SDL_FRect) +// (https://wiki.libsdl.org/SDL_FRect) type FRect struct { X float32 // the x location of the rectangle's upper left corner Y float32 // the y location of the rectangle's upper left corner diff --git a/sdl/render.go b/sdl/render.go index 4318832f..bb6f066d 100644 --- a/sdl/render.go +++ b/sdl/render.go @@ -558,14 +558,14 @@ func (texture *Texture) GetBlendMode() (bm BlendMode, err error) { } // SetScaleMode Set the scale mode used for texture scale operations. -// TODO: (https://wiki.libsdl.org/SDL_SetTextureScaleMode) +// (https://wiki.libsdl.org/SDL_SetTextureScaleMode) func (texture *Texture) SetScaleMode(sm ScaleMode) error { return errorFromInt(int( C.SDL_SetTextureScaleMode(texture.cptr(), sm.c()))) } // GetScaleMode returns the scale mode used for texture scale operations. -// TODO: (https://wiki.libsdl.org/SDL_GetTextureScaleMode) +// (https://wiki.libsdl.org/SDL_GetTextureScaleMode) func (texture *Texture) GetScaleMode() (sm ScaleMode, err error) { ret := C.SDL_GetTextureScaleMode(texture.cptr(), sm.cptr()) return sm, errorFromInt(int(ret)) @@ -960,14 +960,14 @@ func (renderer *Renderer) CopyEx(texture *Texture, src, dst *Rect, angle float64 } // DrawPointF draws a point on the current rendering target. -// TODO: (https://wiki.libsdl.org/SDL_RenderDrawPointF) +// (https://wiki.libsdl.org/SDL_RenderDrawPointF) func (renderer *Renderer) DrawPointF(x, y float32) error { return errorFromInt(int( C.SDL_RenderDrawPointF(renderer.cptr(), C.float(x), C.float(y)))) } // DrawPointsF draws multiple points on the current rendering target. -// TODO: (https://wiki.libsdl.org/SDL_RenderDrawPointsF) +// (https://wiki.libsdl.org/SDL_RenderDrawPointsF) func (renderer *Renderer) DrawPointsF(points []FPoint) error { return errorFromInt(int( C.SDL_RenderDrawPointsF( @@ -977,7 +977,7 @@ func (renderer *Renderer) DrawPointsF(points []FPoint) error { } // DrawLineF draws a line on the current rendering target. -// TODO: (https://wiki.libsdl.org/SDL_RenderDrawLineF) +// (https://wiki.libsdl.org/SDL_RenderDrawLineF) func (renderer *Renderer) DrawLineF(x1, y1, x2, y2 float32) error { return errorFromInt(int( C.SDL_RenderDrawLineF( @@ -989,7 +989,7 @@ func (renderer *Renderer) DrawLineF(x1, y1, x2, y2 float32) error { } // DrawLinesF draws a series of connected lines on the current rendering target. -// TODO: (https://wiki.libsdl.org/SDL_RenderDrawLinesF) +// (https://wiki.libsdl.org/SDL_RenderDrawLinesF) func (renderer *Renderer) DrawLinesF(points []FPoint) error { return errorFromInt(int( C.SDL_RenderDrawLinesF( @@ -999,14 +999,14 @@ func (renderer *Renderer) DrawLinesF(points []FPoint) error { } // DrawRectF draws a rectangle on the current rendering target. -// TODO: (https://wiki.libsdl.org/SDL_RenderDrawRectF) +// (https://wiki.libsdl.org/SDL_RenderDrawRectF) func (renderer *Renderer) DrawRectF(rect *FRect) error { return errorFromInt(int( C.SDL_RenderDrawRectF(renderer.cptr(), rect.cptr()))) } // DrawRectsF draws some number of rectangles on the current rendering target. -// TODO: (https://wiki.libsdl.org/SDL_RenderDrawRectsF) +// (https://wiki.libsdl.org/SDL_RenderDrawRectsF) func (renderer *Renderer) DrawRectsF(rects []FRect) error { return errorFromInt(int( C.SDL_RenderDrawRectsF( @@ -1016,14 +1016,14 @@ func (renderer *Renderer) DrawRectsF(rects []FRect) error { } // FillRectF fills a rectangle on the current rendering target with the drawing color. -// TODO: (https://wiki.libsdl.org/SDL_RenderFillRectF) +// (https://wiki.libsdl.org/SDL_RenderFillRectF) func (renderer *Renderer) FillRectF(rect *FRect) error { return errorFromInt(int( C.SDL_RenderFillRectF(renderer.cptr(), rect.cptr()))) } // FillRectsF fills some number of rectangles on the current rendering target with the drawing color. -// TODO: (https://wiki.libsdl.org/SDL_RenderFillRectsF) +// (https://wiki.libsdl.org/SDL_RenderFillRectsF) func (renderer *Renderer) FillRectsF(rects []FRect) error { return errorFromInt(int( C.SDL_RenderFillRectsF( @@ -1033,7 +1033,7 @@ func (renderer *Renderer) FillRectsF(rects []FRect) error { } // CopyF copies a portion of the texture to the current rendering target. -// TODO: (https://wiki.libsdl.org/SDL_RenderCopyF) +// (https://wiki.libsdl.org/SDL_RenderCopyF) func (renderer *Renderer) CopyF(texture *Texture, src *Rect, dst *FRect) error { return errorFromInt(int( C.SDL_RenderCopyF( @@ -1044,7 +1044,7 @@ func (renderer *Renderer) CopyF(texture *Texture, src *Rect, dst *FRect) error { } // CopyExF copies a portion of the texture to the current rendering target, optionally rotating it by angle around the given center and also flipping it top-bottom and/or left-right. -// TODO: (https://wiki.libsdl.org/SDL_RenderCopyExF) +// (https://wiki.libsdl.org/SDL_RenderCopyExF) func (renderer *Renderer) CopyExF(texture *Texture, src *Rect, dst *FRect, angle float64, center *FPoint, flip RendererFlip) error { return errorFromInt(int( C.SDL_RenderCopyExF( @@ -1104,7 +1104,7 @@ func (renderer *Renderer) Destroy() error { } // Flush forces the rendering context to flush any pending commands to the underlying rendering API. -// TODO: (https://wiki.libsdl.org/SDL_RenderFlush) +// (https://wiki.libsdl.org/SDL_RenderFlush) func (renderer *Renderer) Flush() error { return errorFromInt(int(C.SDL_RenderFlush(renderer.cptr()))) } diff --git a/sdl/surface.go b/sdl/surface.go index de977d75..a16b6b0f 100644 --- a/sdl/surface.go +++ b/sdl/surface.go @@ -251,20 +251,20 @@ func CreateRGBSurfaceWithFormatFrom(pixels unsafe.Pointer, width, height, depth, } // SetYUVConversionMode sets the YUV conversion mode -// TODO: (https://wiki.libsdl.org/SDL_SetYUVConversionMode) +// (https://wiki.libsdl.org/SDL_SetYUVConversionMode) func SetYUVConversionMode(mode YUV_CONVERSION_MODE) { _mode := C.SDL_YUV_CONVERSION_MODE(mode) C.SDL_SetYUVConversionMode(_mode) } // GetYUVConversionMode gets the YUV conversion mode -// TODO: (https://wiki.libsdl.org/SDL_GetYUVConversionMode) +// (https://wiki.libsdl.org/SDL_GetYUVConversionMode) func GetYUVConversionMode() YUV_CONVERSION_MODE { return YUV_CONVERSION_MODE(C.SDL_GetYUVConversionMode()) } // GetYUVConversionModeForResolution gets the YUV conversion mode -// TODO: (https://wiki.libsdl.org/SDL_GetYUVConversionModeForResolution) +// (https://wiki.libsdl.org/SDL_GetYUVConversionModeForResolution) func GetYUVConversionModeForResolution(width, height int) YUV_CONVERSION_MODE { _width := C.int(width) _height := C.int(height) @@ -357,7 +357,7 @@ func (surface *Surface) SetColorKey(flag bool, key uint32) error { } // HasColorKey returns the color key (transparent pixel) for the surface. -// TODO: (https://wiki.libsdl.org/SDL_HasColorKey) +// (https://wiki.libsdl.org/SDL_HasColorKey) func (surface *Surface) HasColorKey() bool { return C.SDL_HasColorKey(surface.cptr()) == C.SDL_TRUE } diff --git a/sdl/system.go b/sdl/system.go index 134d6f1e..153b9900 100644 --- a/sdl/system.go +++ b/sdl/system.go @@ -19,7 +19,7 @@ static inline SDL_bool SDL_IsTablet() import "C" // IsTablet returns true if the current device is a tablet -// TODO: (https://wiki.libsdl.org/SDL_IsTablet) +// (https://wiki.libsdl.org/SDL_IsTablet) func IsTablet() bool { return C.SDL_IsTablet() == C.SDL_TRUE } diff --git a/sdl/touch.go b/sdl/touch.go index 456b5b6d..6c97d9a9 100644 --- a/sdl/touch.go +++ b/sdl/touch.go @@ -72,7 +72,7 @@ func GetTouchDevice(index int) TouchID { } // GetTouchDeviceType returns the type of the given touch device. -// TODO: (https://wiki.libsdl.org/SDL_GetTouchDeviceType) +// (https://wiki.libsdl.org/SDL_GetTouchDeviceType) func GetTouchDeviceType(id TouchID) TouchDeviceType { return TouchDeviceType(C.SDL_GetTouchDeviceType(C.SDL_TouchID(id))) }