Guest User

Untitled

a guest
May 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. CEL* Cel2ANIM::getCEL(int frame, CEL* cel, bool){
  2. int didx = pointers[frame];
  3. int nbytes = 0;
  4. int total = width*height;
  5.  
  6. while(didx < pointers[frame+1]-10){
  7. if((data[didx] & 0xFF) < 128){
  8. total-= data[didx++] & 0xFF;
  9. continue;
  10. }
  11. if((data[didx] & 0xFF) > 190){
  12. nbytes = 256 - (data[didx++] & 0xFF);
  13. for(int i = 0; i < nbytes; i++)
  14. cel->data[total--] = data[didx++] & 0xFF;
  15. continue;
  16. }
  17. nbytes = 191 - (data[didx++] & 0xFF);
  18. for(int i = 0; i < nbytes; i++)
  19. cel->data[total--] = data[didx] & 0xFF;
  20. didx++;
  21. }
  22. return cel;
  23. }
Add Comment
Please, Sign In to add comment