T
TomSinister
Guest
I was wondering if it was possible to use a negative offset to read values from a buffer_wrap. As an example, say I want to read data from 10 positions behind a buffer_wrap current "seek" position (seek - 10) with the buffer_peek command. If the current seek position is less than 10, will the buffer_read command then wrap around and read from the end of the buffer? or will it cause a compile error?
If this feature is not available in GMS2, I think I can write a workaround by checking to see if the solution to (seek - 10) is negative, and if it is I can add the total size of the buffer to the negative answer, which will result in the same sort of wrapping I am hoping for.
If this feature is not available in GMS2, I think I can write a workaround by checking to see if the solution to (seek - 10) is negative, and if it is I can add the total size of the buffer to the negative answer, which will result in the same sort of wrapping I am hoping for.
Last edited by a moderator: