diff --git a/pkg/audio.go b/pkg/audio.go index 7c90ae9..99a51cc 100644 --- a/pkg/audio.go +++ b/pkg/audio.go @@ -20,7 +20,9 @@ type AudioPlayer struct { done chan bool } -// Opens a audio file. It supports two file formats: WAV and MP3. Plays the audio file using Start function. Stop the audio file using Stop function. Close the audio file using Close function. +// Opens a audio file. It supports two file formats: WAV and MP3. +// Plays the audio file using Start function. Stop the audio file using Stop function. +// Close the audio file using Close function. func OpenAudioFile(filePath string) AudioPlayer { f, err := os.Open(filePath) if err != nil { diff --git a/pkg/draw.go b/pkg/draw.go index 2636faa..e1fe05f 100644 --- a/pkg/draw.go +++ b/pkg/draw.go @@ -7,7 +7,12 @@ func (r *Renderer2D) DrawRect(x, y, width, height float32, color [4]int) { gl.Begin(gl.QUADS) defer gl.End() - gl.Color4f(float32(color[0]/255), float32(color[1]/255), float32(color[2]/255), float32(color[3]/255)) + gl.Color4f( + float32(color[0]/255), + float32(color[1]/255), + float32(color[2]/255), + float32(color[3]/255), + ) gl.Vertex2f(x, y) gl.Vertex2f(x+width, y) gl.Vertex2f(x+width, y+height) @@ -16,7 +21,12 @@ func (r *Renderer2D) DrawRect(x, y, width, height float32, color [4]int) { // Clears the screen whith the specific color that is provided func (r *Renderer2D) ClearColor(color [4]int) { - gl.ClearColor(float32(color[0]/255), float32(color[1]/255), float32(color[2]/255), float32(color[3]/255)) + gl.ClearColor( + float32(color[0]/255), + float32(color[1]/255), + float32(color[2]/255), + float32(color[3]/255), + ) } // Draws a new line by the given x1, x2, y1, y2 and color @@ -26,7 +36,12 @@ func (r *Renderer2D) DrawLine(x1, x2, y1, y2 float32, color [4]int) { gl.Begin(gl.LINES) defer gl.End() - gl.Color4f(float32(color[0]/255), float32(color[1]/255), float32(color[2]/255), float32(color[3]/255)) + gl.Color4f( + float32(color[0]/255), + float32(color[1]/255), + float32(color[2]/255), + float32(color[3]/255), + ) gl.Vertex2f(x1, y1) gl.Vertex2f(x2, y2) }