buffer_load_partial(buffer, filename, offset, src_len, dest_offset);
|buffer||The index of the buffer to load.|
|filename||The name of the file to load.|
|offset||The offset within the buffer to load to (in bytes).|
|src_len||The length of the part of the buffer to load (in bytes).|
|dest_offset||The offset where to start putting the partial data in the new buffer (in bytes).|
This function will load some of the buffer data that was previously saved using the buffer_save() functions into an already created buffer. You give the id of the previously created buffer to load into, then the saved buffer file to load, and then the offset from the start of the buffer (in bytes) that you wish to load the data from. The following arguments are for setting the length of the buffer data (in bytes) from the initial offset point that you wish to load and the offset point to load the data to in the buffer (again, in bytes).
buff = buffer_create(256, buffer_grow, 1);
var _file = "save.dat";
var _so = 6;
var _sl = 5;
var _do= 0;
buffer_load_partial(buff, _file, _so, _sl, _do);
The above code will create a new "grow" buffer and then load in a part of the data saved in the file "save.dat" to it.