From bd6dc13fa69bd5b85cca93edb1f4715c5faf4217 Mon Sep 17 00:00:00 2001 From: gurpreetsinghmatharoo Date: Tue, 13 Feb 2024 15:17:05 +0530 Subject: [PATCH] [General] Fixed description of buffer_poke, which was not wrong, but confusingly written * Also improved buffer_seek, buffer_tell, and buffer_write pages with minor improvements https://github.com/YoYoGames/GameMaker-Bugs/issues/4650 --- .../GML_Reference/Buffers/buffer_poke.htm | 11 ++++++----- .../GML_Reference/Buffers/buffer_seek.htm | 12 ++++++------ .../GML_Reference/Buffers/buffer_tell.htm | 5 +++-- .../GML_Reference/Buffers/buffer_write.htm | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_poke.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_poke.htm index e914b0823..a0ecebcbc 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_poke.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_poke.htm @@ -15,7 +15,8 @@

buffer_poke

-

With the buffer_write function, you can write data to the given buffer at the current "seek" position, with each piece of data advancing this position by the bytes being written or read. However, it may be necessary for you to change a given piece of data without wanting to change the current seek position, and that's when you would use this function. You supply the function with a buffer, and then the offset position from the buffer start (in bytes) within that buffer to write to, as well as the data type and the value to be written.

+

With this function you can write data into a buffer at the specified offset, without changing the seek position. This is different from buffer_write, which uses the current seek position as the offset and advances that with the amount of bytes written.

+

You supply the function with a buffer, and then the offset position from the buffer start (in bytes) within that buffer to write to, as well as the data type and the value to be written.

 

Syntax:

buffer_poke(buffer, offset, type, value);

@@ -28,22 +29,22 @@

Syntax:

buffer - Buffer + Buffer The buffer to use. offset - Real + Real The offset position (in bytes) within the buffer to write the given data to. type - Buffer Data Type Constant + Buffer Data Type Constant The type of data that is to be written to the buffer (see the list of constants here). value - Any + Any The data to add to the buffer, in accordance with the type specified. diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_seek.htm b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_seek.htm index c52d045cc..1ab5377f5 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_seek.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Buffers/buffer_seek.htm @@ -16,7 +16,7 @@

buffer_seek

This function moves the seek position of a buffer, setting it relative to the start, end or current seek position (that which was last used when reading or writing data).

-

The seek position is the offset (in bytes) from the start of the buffer where new values are written, and from where values are read. It also moves automatically when you read from or write to a buffer.

+

The seek position is the offset (in bytes) from the start of the buffer where new values are written, and from where values are read. It also moves automatically when you read from or write to a buffer.

Usage Notes