diff --git a/raylib/raylib.go b/raylib/raylib.go index 935709a..0cd3126 100644 --- a/raylib/raylib.go +++ b/raylib/raylib.go @@ -929,7 +929,7 @@ type ModelAnimation struct { FrameCount int32 Bones *BoneInfo FramePoses **Transform - Name [32]int8 + Name [32]uint8 } // GetBones returns the bones information (skeleton) of a ModelAnimation as go slice @@ -943,6 +943,17 @@ func (m ModelAnimation) GetFramePose(frame, bone int) Transform { return unsafe.Slice(framePoses[frame], m.BoneCount)[bone] } +// GetName returns the ModelAnimation's name as go string +func (m ModelAnimation) GetName() string { + var end int + for end = range m.Name { + if m.Name[end] == 0 { + break + } + } + return string(m.Name[:end]) +} + // RayCollision type - ray hit information type RayCollision struct { Hit bool