raylib-go icon indicating copy to clipboard operation
raylib-go copied to clipboard

AutomationEventsList implemented incorrectly?

Open Hultan opened this issue 1 year ago • 0 comments

AutomationEventsList is implemented like this:

// AutomationEventList - Automation event list
type AutomationEventList struct {
    Capacity uint32
    Count    uint32
    Events   *AutomationEvent
}

where Events is a pointer to a single AutomationEvent. But if you look at the Automation Events example it looks like is should actually be a list of AutomationEvents. Shouldn't this be a slice, or an array in raylib-go, or is it supposed to be a linked list and AutomationEvent is missing a next pointer?

Otherwise, could someone please show me how to implement this logic in go?

// NOTE: Multiple events could be executed in a single frame
while (playFrameCounter == aelist.events[currentPlayFrame].frame)
{
    PlayAutomationEvent(aelist.events[currentPlayFrame]);
    currentPlayFrame++;

    ....
}

Hultan avatar Oct 19 '24 11:10 Hultan