Advertisement
tyrz939

Untitled

Jan 6th, 2017
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Frame & Input save loop
  2. var inp, f0, f1, f2;
  3. for(var i = 0; i < pos; i++){
  4.     // Frame Count
  5.     f0 = floor(replay[timer,i]/65536);
  6.     replay[timer,i] -= f0 * 65536;
  7.     f1 = floor(replay[timer,i]/256);
  8.     replay[timer,i] -= f1 * 256;
  9.     f2 = replay[timer,i];
  10.     file_bin_write_byte(file, f0);
  11.     file_bin_write_byte(file, f1);
  12.     file_bin_write_byte(file, f2);
  13.    
  14.     // Input
  15.     inp = 0;
  16.     inp += replay[up, i] <<6;
  17.     inp += replay[down, i] <<5;
  18.     inp += replay[left, i] <<4;
  19.     inp += replay[right, i] <<3;
  20.     inp += replay[focus, i] <<2;
  21.     inp += replay[shoot, i] <<1;
  22.     inp += replay[bomb, i];
  23.     file_bin_write_byte(file, inp);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement