diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 250ab1a..71c4e77 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,3 +21,21 @@ jobs: - name: Build run: go build ./... working-directory: raylib + - name: Verify dependencies + run: go mod verify + working-directory: raylib + - name: Build + run: go build -v ./... + working-directory: raylib + - name: Run go vet + run: go vet ./... + working-directory: raylib + - name: Install staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@latest + working-directory: raylib + - name: Run staticcheck + run: staticcheck ./... + working-directory: raylib + - name: Run tests + run: go test -race -vet=off ./... + working-directory: raylib diff --git a/Makefile b/Makefile deleted file mode 100644 index 0e4a951..0000000 --- a/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -PACKAGES= raylib raygui easings physics rres - -GO?= go - -all: packages - -packages: - @for pkg in ${PACKAGES}; do \ - echo "Building package github.com/gen2brain/raylib-go/$$pkg..."; \ - ${GO} build github.com/gen2brain/raylib-go/$$pkg || exit 1; \ - done diff --git a/raylib/platform_desktop.go b/raylib/platform_desktop.go index 8b4e146..c01b84f 100644 --- a/raylib/platform_desktop.go +++ b/raylib/platform_desktop.go @@ -27,7 +27,6 @@ func InitWindow(width int32, height int32, title string) { // SetCallbackFunc - Sets callback function func SetCallbackFunc(func()) { - return } // ShowCursor - Shows cursor @@ -87,7 +86,6 @@ func LoadDroppedFiles() []string { // UnloadDroppedFiles - Unload dropped filepaths func UnloadDroppedFiles() { - return } // OpenAsset - Open asset diff --git a/raylib/raylib.go b/raylib/raylib.go index a87909e..31e383f 100644 --- a/raylib/raylib.go +++ b/raylib/raylib.go @@ -848,7 +848,7 @@ type MaterialMap struct { Value float32 } -// Model, meshes, materials and animation data +// Model is struct of model, meshes, materials and animation data type Model struct { // Local transform matrix Transform Matrix @@ -1195,6 +1195,7 @@ func newRenderTexture2DFromPointer(ptr unsafe.Pointer) RenderTexture2D { return *(*RenderTexture2D)(ptr) } +// TraceLogLevel parameter of trace log message type TraceLogLevel int // Trace log level diff --git a/raylib/raymath.go b/raylib/raymath.go index 0d4bbae..c616d16 100644 --- a/raylib/raymath.go +++ b/raylib/raymath.go @@ -60,7 +60,7 @@ func Vector2Negate(v Vector2) Vector2 { return NewVector2(-v.X, -v.Y) } -// Vector2Divide - Divide vector by vector +// Vector2DivideV - Divide vector by vector func Vector2DivideV(v1, v2 Vector2) Vector2 { return NewVector2(v1.X/v2.X, v1.Y/v2.Y) } @@ -174,8 +174,6 @@ func Vector3CrossProduct(v1, v2 Vector3) Vector3 { // Vector3Perpendicular - Calculate one vector perpendicular vector func Vector3Perpendicular(v Vector3) Vector3 { - result := Vector3{} - min := math.Abs(float64(v.X)) cardinalAxis := NewVector3(1.0, 0.0, 0.0) @@ -188,7 +186,7 @@ func Vector3Perpendicular(v Vector3) Vector3 { cardinalAxis = NewVector3(0.0, 0.0, 1.0) } - result = Vector3CrossProduct(v, cardinalAxis) + result := Vector3CrossProduct(v, cardinalAxis) return result }