From 23f1ab19b7b38839a2c0539588494a58989a8638 Mon Sep 17 00:00:00 2001 From: JupiterRider <60042618+JupiterRider@users.noreply.github.com> Date: Sun, 24 Nov 2024 12:20:06 +0100 Subject: [PATCH] Update LoadImageAnim to match purego signature --- raylib/rtextures.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raylib/rtextures.go b/raylib/rtextures.go index a2272a3..d9a64de 100644 --- a/raylib/rtextures.go +++ b/raylib/rtextures.go @@ -104,10 +104,10 @@ func LoadImageRaw(fileName string, width, height int32, format PixelFormat, head } // LoadImageAnim - Load image sequence from file (frames appended to image.data) -func LoadImageAnim(fileName string, frames *int32) *Image { +func LoadImageAnim(fileName string, frames []int32) *Image { cfileName := C.CString(fileName) defer C.free(unsafe.Pointer(cfileName)) - cframes := (*C.int)(frames) + cframes := (*C.int)(unsafe.Pointer(&frames[0])) ret := C.LoadImageAnim(cfileName, cframes) v := newImageFromPointer(unsafe.Pointer(&ret)) return v