| 559 | } |
| 560 | |
| 561 | int rlencodeundo(int type, vector<uchar> &t, block *s) |
| 562 | { |
| 563 | putuint(t, type); |
| 564 | putuint(t, s->x); |
| 565 | putuint(t, s->y); |
| 566 | putuint(t, s->xs); |
| 567 | putuint(t, s->ys); |
| 568 | loopi(5) putint(t, s->p[i]); |
| 569 | vector<uchar> tmp; |
| 570 | rlencodecubes(tmp, (sqr *)(s+1), s->xs * s->ys, true); |
| 571 | putuint(t, tmp.length()); |
| 572 | t.put(tmp.getbuf(), tmp.length()); |
| 573 | #ifdef _DEBUG |
| 574 | if(worldiodebug) clientlogf(" compressing redo/undo x %d, y %d, xs %d, ys %d, compressed length %d, cubes %d", s->x, s->y, s->xs, s->ys, tmp.length(), s->xs * s->ys); |
| 575 | #endif |
| 576 | return t.length(); |
| 577 | } |
| 578 | |
| 579 | int backupeditundo(vector<uchar> &buf, int undolimit, int redolimit) |
| 580 | { |
no test coverage detected