SHARE
TWEET

list_buffer_* functions

a guest Oct 5th, 2017 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// @desc list_buffer_write(id, buffer, data_type)
  2. /// @arg id
  3. /// @arg buffer
  4. /// @arg data_type
  5.  
  6. var list_size = ds_list_size(argument0);
  7.  
  8. buffer_write(argument1,buffer_u16,list_size);
  9. for ( var i = 0; i < list_size; i ++; ){
  10. buffer_write(argument1,argument2,argument0[| i]);
  11. }
  12.  
  13. // -- THIS IS A DIVIDER BETWEEN THE TWO SCRIPTS -- \\
  14.  
  15. /// @desc list_buffer_read(buffer, data_type)
  16. /// @arg buffer
  17. /// @arg data_type
  18.  
  19. var list = ds_list_create();
  20.  
  21. var list_size = buffer_read(argument0,buffer_u16);
  22.  
  23. buffer_write(argument0,buffer_u16,list_size);
  24. for ( var i = 0; i < list_size; i ++; ){
  25. ds_list_add(list,buffer_read(argument0,argument1));
  26. }
  27.  
  28. return list;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top